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