#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, a, b, min_num = 100;
  cin >> n >> s;
  int i;
  bool ok = false;
  for (i = 0; i < n; i++) {
    cin >> a >> b;
    if (a < s)
      if (b) min_num = min(min_num, b);
    if (a < s || (a == s && b == 0)) ok = true;
  }
  if (!ok)
    printf("-1\n");
  else
    printf("%d\n", 100 - min_num);
  return 0;
}
