#include <bits/stdc++.h>
using namespace std;
long long n, s, x[102], y[102], i, j, a[102], ma, k;
int main() {
  cin >> n >> s;
  for (i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
    if (s > x[i] || (y[i] == 0 && s == x[i])) {
      a[i] = 100 - y[i] + (s - x[i]) * 100;
      while (a[i] >= 100) a[i] = a[i] - 100;
    } else
      k++;
  }
  for (i = 1; i <= n; i++) {
    if (a[i] > ma) ma = a[i];
  }
  if (k == n)
    cout << -1 << endl;
  else
    cout << ma << endl;
  return 0;
}
