#include <bits/stdc++.h>
#define ll long long
#define _ ios::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL);
using namespace std;
int main() { _
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout);
#endif
ll n, m; cin >> n >> m;
vector <pair <ll, ll>> vec(n);
for(int i = 0; i < n; i++){
cin >> vec[i].first >> vec[i].second;
}
long double sum = 0.0;
for(int i = 0; i < n; i++){
sum += 1.0 * vec[i].first * vec[i].second / 100;
if(sum > m){
cout << i + 1 << endl;
return 0;
}
}
cout << -1 << endl;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgbGwgbG9uZyBsb25nCiNkZWZpbmUgXyBpb3M6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7Y291dC50aWUoTlVMTCk7Y2luLnRpZShOVUxMKTsKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKIAppbnQgbWFpbigpIHsgXwojaWZuZGVmIE9OTElORV9KVURHRQogICAgZnJlb3BlbigiaW5wdXQudHh0IiwgInIiLCBzdGRpbik7IC8vZnJlb3Blbigib3V0cHV0LnR4dCIsICJ3Iiwgc3Rkb3V0KTsKI2VuZGlmCiAgICBsbCBuLCBtOyBjaW4gPj4gbiA+PiBtOwogICAgdmVjdG9yIDxwYWlyIDxsbCwgbGw+PiB2ZWMobik7CiAgICBmb3IoaW50IGkgPSAwOyBpIDwgbjsgaSsrKXsKICAgICAgICBjaW4gPj4gdmVjW2ldLmZpcnN0ID4+IHZlY1tpXS5zZWNvbmQ7CiAgICB9CiAgICBsb25nIGRvdWJsZSBzdW0gPSAwLjA7CiAgICBmb3IoaW50IGkgPSAwOyBpIDwgbjsgaSsrKXsKICAgICAgICBzdW0gKz0gMS4wICogdmVjW2ldLmZpcnN0ICogdmVjW2ldLnNlY29uZCAvIDEwMDsKICAgICAgICBpZihzdW0gPiBtKXsKICAgICAgICAgICAgY291dCA8PCBpICsgMSA8PCBlbmRsOwogICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICB9CiAgICB9CiAgICBjb3V0IDw8IC0xIDw8IGVuZGw7Cn0=