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