#include <bits/stdc++.h>
struct sugar {
  long long d, c;
};
int main() {
  long long n, s, i, max = -1000000000, p = 1, ans;
  struct sugar ar[105];
  scanf("%lld%lld", &n, &s);
  for (i = 0; i < n; i++) scanf("%lld%lld", &ar[i].d, &ar[i].c);
  for (i = 0; i < n; i++) {
    if (ar[i].d < s) {
      p = 2;
      ans = 100 - ar[i].c;
    }
    if (ar[i].d == s && ar[i].c > 0) continue;
    if (ar[i].d == s && ar[i].c == 0) {
      p = 2;
      ans = 0;
    }
    if (ar[i].d < s && ar[i].c == 0) {
      p = 2;
      ans = 0;
    }
    if (ans > max) max = ans;
  }
  if (p == 1)
    printf("-1\n");
  else
    printf("%lld\n", max);
  return 0;
}
