#include <bits/stdc++.h>
using namespace std;
const double EPS = (1e-12);
const double PI = acos(-1);
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, -1, 1};
int main() {
  ios_base::sync_with_stdio(0);
  int n, s;
  int x, y;
  cin >> n >> s;
  int mx = 0;
  bool canBuy = false;
  for (int i = 0; i < n; ++i) {
    cin >> x >> y;
    int price = ceil(x + (y * 1.0 / 100));
    if (s >= price) {
      canBuy = true;
      if (y != 0) mx = max(mx, 100 - y);
    }
  }
  if (canBuy)
    cout << mx << endl;
  else
    cout << -1 << endl;
  return 0;
}
