#include <iostream>
#include <cassert>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <fstream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <set>
#include <map>
#include <iomanip>
#define nextLine() { for (int c = getchar(); c != '\n' && c != EOF; c = getchar()); }
#define sqr(a) ((a)*(a))
#define has(mask,i) (((mask) & (1<<(i))) == 0 ? false : true)
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#define task "garden"
using namespace std;

#define pii pair<int,int>
#define mp make_pair
#define pb push_back
#define fi first
#define se second
typedef long long LL;
typedef long double ldb;

const int inf = (1 << 30) - 1;
const ldb eps = 1e-9;
const ldb pi = fabs(atan2(0.0, -1.0));

int main()
{
	freopen(task".in","r",stdin);
	freopen(task".out","w",stdout);
	int n, m, h;
	assert(scanf("%d%d%d", &n, &m, &h) == 3);
	assert(1 <= n && n <= 100000);
	assert(1 <= m && m <= 1000000000);
	assert(0 <= h && h <= 1000000000);

	int res = 0;
	for (int i = 0; i < n; i++)
	{
		int a, b;
		assert(scanf("%d%d", &a, &b) == 2);
		assert(0 <= a && a <= 1000000000);
		assert(0 <= b && b <= 1000000000);

		if (a + (LL)b * (m - 1) < h)
		{
			res = -1;
			break;
		}
		if (a + (LL)b * (m - 1) > h)
			res = 1;
	}

	printf("%d", res);
	return 0;
}
