#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;
}

