#include <bits/stdc++.h>

using namespace std;

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

#include <bits/stdc++.h>      
using namespace std;            
 
#define  int               long long int
#define  ld                long double
#define  f(i,j,n)            for(int i = j; i <= n; i++)
#define  r(i,n,j)           for(int i = n; i >= j; i--)
#define  all(container)       container.begin() , container.end()
#define  sz(container)        (int)container.size()
#define  T             int ttt; cin >> ttt; while(ttt--)
#define fast    ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);

int32_t main()
{
    fast
    int n,k,ans=0;  cin>>n>>k;
    int ff=1e15;
    f(i,1,n){
        int x,y;    cin>>x>>y;
        ans+= x*y;
        if(ans>k*100){
            cout<<i;
            exit(0);
        }
    }
    cout<<"-1";
}