/*************************************************
Author :supermaker
Created Time :2015/11/22 15:49:21
File Location :C:\Users\abcd\Desktop\vim practice
**************************************************/
#pragma comment(linker, "/STACK:102400000,102400000")
#include <set>
#include <bitset>
#include <list>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <string>
#include <vector>
#include <ios>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <utility>
#include <complex>
#include <numeric>
#include <functional>
#include <cmath>
#include <ctime>
#include <climits>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cassert>
using namespace std;
#define CFF freopen ("aaa.txt", "r", stdin)
#define CPPFF ifstream cin ("aaa.txt")
#define DB(ccc) cout << #ccc << " = " << ccc << endl
#define PB push_back
#define MP(A, B) make_pair(A, B)
typedef long long LL;
typedef unsigned long long ULL;
typedef double DB;
typedef pair <int, int> PII;
typedef pair <int, bool> PIB;
const int INF = 0x7F7F7F7F;
const int MOD = 1e9 + 7;
const double EPS = 1e-10;
const double PI = 2 * acos (0.0);
const int maxn = 1e5 + 6666;
int aa[166], bb[166], dp[166][166];
int main()
{
//CFF;
//CPPFF;
int n, m, k, s;
while (scanf ("%d %d %d %d", &n, &m, &k, &s) != EOF)
{
for (int i = 1; i <= k; i++)
scanf ("%d %d", &aa[i], &bb[i]);
memset (dp, 0, sizeof (dp));
for (int i = 1; i <= k; i++)
{
for (int j = bb[i]; j <= m; j++)
{
for (int q = 1; q <= s; q++)
{
dp[j][q] = max (dp[j][q], dp[j-bb[i]][q-1] + aa[i]);
}
}
}
int res = INF;
for (int i = 1; i <= s; i++)
{
for (int j = 0; j <= m; j++)
{
if (dp[j][i] >= n)
{
res = min (res, j);
}
}
}
if (res == INF) puts ("-1");
else printf ("%d\n", m - res);
}
return 0;
}