#include <bits/stdc++.h> 
using namespace std;
#define FOR(i,l,r) for(size_t i=(l); i<(r); i++)
#define REP(i,n) FOR(i,0,n)
#define endl "\n"
#define debug(x) cout<<x<<endl;
typedef long long ll;
static const ll INF = 1ll<<60;
static const double EPS = 10e-12;

int main(){
    int N;
    ll X;
    cin>>N>>X;
    vector<ll> V(N),P(N);
    REP(i,N) cin>>V[i]>>P[i];
    ll sum = 0;
    int ans = -1;

    X *= 100;

    REP(i,N){
        sum += V[i] * P[i];
        if(sum > X){
            ans = i+1;
            break;
        }
    }
    
    cout<<ans<<endl;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(i=0;i<n;i++)
#define Rep(i,x,n) for(i=x;i<=n;i++)
#define foreach(c,itr) for(__typeof(c)::iterator itr=c.begin();itr!=c.end();itr++)
#define all(v) v.begin(),v.end()
#define p_b push_back
#define fr first
#define sc second
#define m_p make_pair
#define setp setprecision
typedef long long ll;
typedef long double ld;
const ll INF=0x3f3f3f3f;
ll gcd(ll x,ll y) {return x%y==0 ? y:gcd(y,x%y);}
int i,j;
 
int n,x;
int v[1005],p[1005];
double ach[1005];
 
int main1(){
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	
	double num=0;
	Rep(i,1,n){
		num+=ach[i];
		if(num>x){
			cout<<i<<endl;
			return 0;
		}
	}
	cout<<-1<<endl;
	return 0;
}

int main2(){
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	
	
	int num=0;
	Rep(i,1,n){
		num+=ach[i];
		if(num>x){
			cout<<i<<endl;
			return 0;
		}
	}
	cout<<-1<<endl;
	return 0;
}

int main(){
	cin>>n>>x;
	Rep(i,1,n){
		cin>>v[i]>>p[i];
		ach[i]=v[i]/100.0*p[i];
	}
	if(n<=3) main1();
	else main2(); 
}