#include <bits/stdc++.h>
int main() {
  int n, s, x, y, i, min = 0, bought = 0;
  scanf("%d%d", &n, &s);
  for (i = 0; i < n; i++) {
    scanf("%d%d", &x, &y);
    if (s > x || s == x && y == 0) {
      bought = 1;
      if ((100 - y > min) && y != 0) min = 100 - y;
    }
  }
  if (!bought)
    printf("-1");
  else
    printf("%d", min);
  return 0;
}
