#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t n, s, x[100001], y[100001], min = 99, dem0 = 0;
  cin >> n >> s;
  for (int i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
    if (n == 1 && x[i] < s) min = y[i];
    if ((x[i] + (y[i] * 1.0 / 100)) <= s) {
      if (y[i] < min && y[i] > 0)
        min = y[i];
      else if (y[i] == 0)
        dem0++;
    }
  }
  if (dem0 == n)
    cout << 0;
  else if (min > 0 && min != 99)
    cout << 100 - min;
  else if (dem0 != 0)
    cout << 0;
  else
    cout << -1;
}
