#include <cstdio>

int main() {
    int N, X, i;
    int V[1000] = {};
    int P[1000] = {};
    scanf("%d %d", &N, &X);
    X *= 100;
    for (i = 0; i < N; i++) scanf("%d %d", V + i, P + i);
    int s = 0;
    for (i = 0; i < N; i++) {
        s += V[i] * P[i];
        if (s > X) break;
    }
    if (i == N) printf("-1");
    else printf("%d", i + 1);
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
using ll = long long;
using P=pair<int,int>;

int main() {
  int n,k;
  cin>>n>>k;
  int z=0;
  int x=0;
  rep(i,n+1) z+=i;
  rep(i,k+1) x+=i;
  ll ans =z*k*100+x*n;
  cout<<ans<<endl;
  return 0;
}
  
  
  
  
