#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, m = 0;
  cin >> n >> s;
  s *= 100;
  bool go = 0;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    x *= 100;
    if ((x + y) <= s) go = 1;
    int p = 0;
    if ((x + y) <= s) p = (100 - y);
    if (y == 0) p = 0;
    m = max(m, p);
  }
  if (go == 0 && m == 0)
    cout << -1;
  else
    cout << m;
  return 0;
}
