#include <bits/stdc++.h>
int main() {
  int n = 0, s = 0, i = 0, max = 0, count = 0;
  int x[111] = {0};
  int y[111] = {0};
  scanf("%d %d", &n, &s);
  for (i = 0; i < n; i++) {
    scanf("%d %d", &x[i], &y[i]);
    if (x[i] < s && y[i] != 0) {
      max = ((100 - y[i]) > max) ? 100 - y[i] : max;
      count++;
    }
    if (x[i] <= s && y[i] == 0) count++;
  }
  if (count > 0)
    printf("%d", max);
  else
    printf("-1");
}
