#include<bits/stdc++.h>
#define MAX 1000000007
#define MOD 998244353
#define ll long long int
#define fo(i,a,n) for(int i=a;i<n;i++)
#define ull unsigned long long int
#define pb push_back
#define eb emplace_back
#define in insert
#define cl clear
#define ii pair<int,int>
#define ld long double
const ll INF  = 1e18;
using namespace std;

void print(int arr[], int n){
    fo(i,0,n){
        cout<<arr[i]<<" "; 
    }
    cout<<endl;
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int n,x;
    cin>>n>>x;

    vector<pair<int, int>> v(n);

    fo(i,0,n){
        cin>>v[i].first>>v[i].second;
    }

    int intake = 0;
    fo(i,0,n){
        intake += (v[i].first * v[i].second);
        if( intake > x*100 ){
            cout<<i+1<<endl;
            return 0;
        }
    }

    cout<<-1<<endl;

    return 0;
}
#include<stdio.h>

int main(){
	int n,x;
	scanf("%d%d",&n,&x);
	int sum=0;
	for(int i=0;i<n;i++){
		int v,p;
		scanf("%d%d",&v,&p);
		sum+=v*p;
		if(sum>x*100){
			printf("%d\n",i+1);
			return 0;
		}
	}
	puts("-1");
}