#include <bits/stdc++.h>
int x[100], y[100];
void sort(int x[], int y[], int n) {
  for (int i = 1; i < n; i++)
    for (int j = 0; j < n - i; j++)
      if (y[j] > y[j + 1]) {
        int t1 = y[j], t2 = x[j];
        y[j] = y[j + 1];
        x[j] = x[j + 1];
        y[j + 1] = t1;
        x[j + 1] = t2;
      }
}
int main() {
  int n, s, t = 0, ans = 0;
  scanf("%d%d", &n, &s);
  for (int i = 0; i < n; i++) scanf("%d%d", &x[i], &y[i]);
  sort(x, y, n);
  for (int i = 0; i < n; i++) {
    if (x[i] < s || (x[i] == s && y[i] == 0)) t = 1;
    if (y[i] != 0 && x[i] < s) {
      ans = 100 - y[i];
      break;
    }
  }
  printf("%d\n", t == 1 ? ans : -1);
}
