#include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;

int main(){
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	cout.tie(0);
    
    ll n,k;
    cin>>n>>k;
    
    ll arr[n][2];
    
    ll sum=0;
    ll x,y;
    
    for(ll i=0;i<n;i++){
        cin>>x>>y;
        arr[i][0]=x;
        arr[i][1]=y;
       
    }
    
    int flag=0;
    for(ll i=0;i<n;i++){
         
        ll a = arr[i][0];
        ll b = arr[i][1];
        
        sum +=a*b;
        double z= sum;
        if(z/100>k){
            flag=i+1;
            break;
        }
    }
    
    if(flag==0)
    cout<<"-1"<<endl;
    else
    cout<<flag<<endl;
    return 0;
}    
#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long lli;
const lli M = 1000000007;
int main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
 
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t=1;
    //cin>>t;
    while(t--)
    {
        lli n,s,d,flag=0; cin>>n>>s>>d;
        for(int i=0; i<n ; i++)
        {
            int x,y;
            cin>>x>>y;
            if(x<s && y>d)
            {
                flag=1;
            }
        }
        if(flag==1)
            cout<<"Yes\n";
        else
            cout<<"No\n";
    }
    return 0;
}