#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s;
  scanf("%d%d", &n, &s);
  int ans = 100, res = 0;
  int flag = 0;
  int a, b;
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &a, &b);
    if (a < s) {
      if (100 - b <= 99 && b > 0) res = (res > 100 - b ? res : 100 - b);
      flag = 1;
    } else if (a == s && b == 0) {
      res = (0 > res ? 0 : res);
      flag = 1;
    }
  }
  if (!flag)
    printf("-1\n");
  else
    printf("%d\n", res);
  return 0;
}
