#include <bits/stdc++.h>

using namespace std;
using int64 = long long;

constexpr int DEBUG = 0;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  int n, x;
  cin >> n >> x;
  x *= 100;
  int c = 0;
  for (int i = 0; i < n; i++) {
    int v, p;
    cin >> v >> p;
    c += v * p;
    if (c > x) {
      cout << i + 1 << endl;
      return 0;
    }
  }
  cout << -1 << endl;
}

#include <bits/stdc++.h>
using namespace std;
#define endl ("\n")
#define pi (3.141592653589)
#define mod 1e9+7
#define int long long
#define float double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(c) c.begin(), c.end()
#define min3(a, b, c) min(c, min(a, b))
#define min4(a, b, c, d) min(d, min(c, min(a, b)))
#define rrep(i, n) for(int i=n-1;i>=0;i--)
#define rep(i,n) for(int i=0;i<n;i++)
#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);



int32_t main(){
    fast
    int t=1;
    // cin>>t;
    while(t--){
        int n;cin>>n;
        float X;cin>>X;
        int a[n], b[n];
        rep(i, n)cin>>a[i]>>b[i];
        int f=0;
        float x=0;
        rep(i, n){
            x+=(b[i]*a[i]);
            if(x>X*100){
                cout<<i+1<<endl;
                f=1;
                break;
            }
        }
        if(f==0)cout<<-1<<endl;
    }
    return 0;
}
