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