#include <bits/stdc++.h>
#define mod 1000000007
#define ll long long int
#define endl "\n"
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);

using namespace std;

void solve()
{
    ll n, i;
    ll x;
    cin>>n>>x;
    ll v[n+9], p[n+9];
    for(i=0; i<n; i++)
    {
        cin>>v[i]>>p[i];
    }
    ll in=0;
    ll ans=-1;
    x=x*100;
    for(i=0; i<n; i++)
    {
        in+=v[i]*p[i];
        if(in>x)
        {
            ans=i+1;
            break;
        }
    }
    cout<<ans;
}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    fastio
    ll t=1;
    // cin>>t;
    while(t--)
    {
        solve();
    }
}
#pragma warning (disable:4996)
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>

#define ll long long

#define REP(i, n) for(int i = 0; i < n; i++)
#define SET(a) int a = 0; (void)scanf("%d", &a);

#define NMAX 1000

typedef struct { int V; int P; }ALCOHOL;

int main() {
	SET(N); SET(X);
	ALCOHOL alcohol;
	int sum = 0;
	int ans = -1;
	REP(i, N) {
		(void)scanf("%d %d", &alcohol.V, &alcohol.P);
		sum += (alcohol.V * alcohol.P);
		if (sum > 100 * X) {
			ans = (i + 1);
			break;
		}
	}
	printf("%d", ans);
	return 0;
}