#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool fs(T &x) {
  int c = getchar();
  int sgn = 1;
  while (~c && c < '0' || c > '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  for (x = 0; ~c && '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  x *= sgn;
  return ~c;
}
int main() {
  int n, s, a, b;
  fs(n);
  fs(s);
  int mx = 100;
  bool flag = false;
  for (int i = 0; i < n; i++) {
    fs(a);
    fs(b);
    if (a < s) {
      if (b) mx = min(mx, b);
      flag = true;
    } else if (a == s) {
      if (!b) flag = true;
    }
  }
  if (!flag)
    cout << -1 << endl;
  else
    cout << 100 - mx << endl;
  return 0;
}
