#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, t, n, m, s, a, b;
  cin >> n >> s;
  int min = 101, flag1 = 0, flag2 = 0;
  for (i = 0; i < n; ++i) {
    cin >> a >> b;
    if (s > a || (s == a && b == 0)) {
      flag1 = 1;
      if (b < min && b != 0) {
        min = b;
        flag2 = 1;
      }
    }
  }
  if (flag1 == 0)
    cout << "-1\n";
  else if (flag2 == 0)
    cout << "0\n";
  else
    cout << (100 - min) << endl;
  return 0;
}
