#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> P;
typedef vector<ll> VI;
typedef vector<VI> VVI;
#define REP(i,n) for(int i=0;i<(n);i++)
#define ALL(v) v.begin(),v.end()
constexpr ll MOD=1000000007;
constexpr ll INF=1e18;

int main(){
    int n, x; cin >> n >> x;
    x*=100;
    int v, p;
    ll sum=0;
    REP(i,n){
        cin >> v >> p;
        sum+=v*p;
        if(sum>x){
            cout << i+1 << endl;
            return 0;
        }
    }
    cout << -1 << endl;
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main(void){
    int n,x;
    cin >> n >> x;
    
    vector<int> v(n);
    vector<int> p(n);
    
    for (int i = 0; i < n; i++) {
        cin >> v.at(i) >> p.at(i);
    }
    
    
    int sum = 0;
    for (int i = 0; i < n; i++) {
        int g = (v.at(i)*p.at(i));
        
        sum += g;
        
        if (sum > x*100) {
            cout << i+1 << endl;
            break;
        }
        }
    if (sum <= x*100) {
        cout << -1 << endl;
    }
}