#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s;
  cin >> n >> s;
  int sum = 100;
  bool res = false;
  for (int i = 0; i < n; i++) {
    int temp1, temp2;
    cin >> temp1 >> temp2;
    if (temp1 < s) {
      res = true;
      if (temp2 != 0 && temp2 < sum) sum = temp2;
    }
    if (temp1 == s && temp2 == 0) res = true;
  }
  if (res)
    cout << 100 - sum;
  else
    cout << -1;
  return 0;
}
