#include <iostream>
#include <cstdio>
using namespace std;
int main(){
#ifndef ONLINE_JUDGE
freopen("date.in","r",stdin);
freopen("date.out","w",stdout);
#endif
int n, s;
cin.sync_with_stdio(false);
cin >> n >> s;
int sol = 100;
bool ok = 0;
for(int i = 1;i <= n; ++i){
int x, y;
cin >> x >> y;
if(x < s){
if(y)
sol = min(sol,y);
}
if(x < s || (x==s && y==0))
ok = 1;
}
if(!ok)
cout<<"-1\n";
else
cout<<100-sol<<"\n";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0ZGlvPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKXsKICAgICNpZm5kZWYgT05MSU5FX0pVREdFCiAgICAgICAgZnJlb3BlbigiZGF0ZS5pbiIsInIiLHN0ZGluKTsKICAgICAgICBmcmVvcGVuKCJkYXRlLm91dCIsInciLHN0ZG91dCk7CiAgICAjZW5kaWYKICAgIGludCBuLCBzOwogICAgY2luLnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7CiAgICBjaW4gPj4gbiA+PiBzOwogICAgaW50IHNvbCA9IDEwMDsKICAgIGJvb2wgb2sgPSAwOwogICAgZm9yKGludCBpID0gMTtpIDw9IG47ICsraSl7CiAgICAgICAgaW50IHgsIHk7CiAgICAgICAgY2luID4+IHggPj4geTsKICAgICAgICBpZih4IDwgcyl7CiAgICAgICAgICAgIGlmKHkpCiAgICAgICAgICAgICAgICBzb2wgPSBtaW4oc29sLHkpOwogICAgICAgIH0KICAgICAgICBpZih4IDwgcyB8fCAoeD09cyAmJiB5PT0wKSkKICAgICAgICAgICAgb2sgPSAxOwogICAgfQogICAgaWYoIW9rKQogICAgICAgIGNvdXQ8PCItMVxuIjsKICAgIGVsc2UKICAgICAgICBjb3V0PDwxMDAtc29sPDwiXG4iOwogICAgcmV0dXJuIDA7Cn0K