#include <bits/stdc++.h>
#define endl '\n'
#define int long long
using namespace std;
const int MAXN = (1 << 20);
const int inf = (int)1e17 + 42;
int n, l, t;
int a[MAXN], x[MAXN];
void read()
{
cin >> n >> l >> t;
for(int i = 0; i < n; i++)
cin >> x[i] >> a[i];
}
int dp[MAXN];
void solve()
{
for(int i = 0; i < n; i++)
x[i] *= 2;
for(int i = 0; i <= 2 * l; i++) dp[i] = inf;
dp[0] = 0;
for(int i = 0; i < n; i++)
{
multiset<int> st;
for(int j = x[i] - t; j < x[i]; j++)
if(j >= 0) st.insert(dp[j] + (x[i] - j) * a[i]);
else st.insert(x[i] * a[i]);
for(int j = x[i]; j < min(2 * l + 1, x[i] + t); j++)
{
dp[j] = min(dp[j], *st.begin() + (j - x[i]) * a[i]);
if(x[i] - t + j - x[i] >= 0)
{
auto it = st.find(dp[j - t] + (t - (j - x[i])) * a[i]);
if(it != st.end()) st.erase(it);
}
else st.erase(x[i] * a[i]);
//cout << i << " -> " << dp[j] << " , " << j << ", " << *st.begin() << endl;
}
}
//for(int i = 0; i <= 2 * l; i++)
// cout << i << ": " << setw(3) << i / 2.0 << " -> " << dp[i] << endl;
if(dp[l * 2] >= inf) cout << "NEPAVYKS" << endl;
else cout << dp[l * 2] << endl;
}
#undef int
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
read();
solve();
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgZW5kbCAnXG4nCgojZGVmaW5lIGludCBsb25nIGxvbmcKCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmNvbnN0IGludCBNQVhOID0gKDEgPDwgMjApOwpjb25zdCBpbnQgaW5mID0gKGludCkxZTE3ICsgNDI7CgppbnQgbiwgbCwgdDsKaW50IGFbTUFYTl0sIHhbTUFYTl07Cgp2b2lkIHJlYWQoKQp7CgljaW4gPj4gbiA+PiBsID4+IHQ7Cglmb3IoaW50IGkgPSAwOyBpIDwgbjsgaSsrKQoJCWNpbiA+P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