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