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