#include <bits/stdc++.h>
using namespace std;
int main()
  {int N, X, i{}, V, P, s{};
  for (cin >> N >> X; ++i, cin >> V >> P;) if ((s += V * P) > 100 * X) cout << i, exit(0);
  puts("-1");}
// Premature optimization is the root of all evil in programming - Knuth.

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

#define mod (int) (1e9+7)


 
void solve(){
	
	ll n,x; cin>>n>>x;
	
	x=x*100; ll curr=0,ans=-1;
	
	for(int i=1; i<=n; i++){
		ll a,b; cin>>a>>b;
		a=a*b; curr+=a;
		if(curr>x && ans==-1){
			ans=i;
		}
	}
	
	cout<<ans<<"\n";
	
   return ;
	
}




int main(){
    ios_base::sync_with_stdio(0);
    
    cin.tie(0);
    
    int t=1;//cin>>t;
    
 
    
    // clock_t begin, end;
    
    // double time_spent;
    
    // begin = clock(); // Time taken till now.
    
    
    while(t--){
    
	  solve();
        
    }
    
 
    
   
   //end= clock(); // Total  Time taken till now.
   
   //time_spent= (end- begin) / CLOCKS_PER_SEC; 
   
   //cout<<time_spent<<"\n";
   
   
   
	
	return 0;
}

