#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, i, x, y;
  cin >> n >> s;
  int sol = 100;
  int f = 1;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    if (x < s) {
      if (y) {
        sol = min(sol, y);
      }
    }
    if (x < s || (x == s && y == 0)) {
      f = 0;
    }
  }
  if (f)
    cout << -1 << endl;
  else
    cout << 100 - sol << endl;
  return 0;
}
