// integer overflow


#include <iostream>
#include <fstream>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <queue>
#include <memory.h>
#include <stack>
#define mp make_pair
#define pb push_back                     

#if ( _WIN32 || __WIN32__ )
    #define LLD "%I64d"
#else
    #define LLD "%lld"
#endif

using namespace std;

typedef long long ll;
typedef long double ld;

int n;
int y,h;

int main()
{
  freopen("garden.in","r",stdin);
  freopen("garden.out","w",stdout);
  scanf("%d %d %d",&n,&y,&h);
  --y;
  int ans = 0;
  for (int i = 0; i < n; i++){
  	int s,add;
  	scanf("%d %d",&s,&add);
  	s += add * y;
  	if (s < h){
  		printf("-1\n");
  		return 0;
  	}
  	if (s > h)
  		ans = 1;
  }
  printf("%d\n",ans);
  return 0;
}