#include <bits/stdc++.h>
int main() {
  int s, n, i, j, k, kindnum = 0, maxsw = 0;
  int shop[200][3], lis[200][3];
  scanf("%d%d", &n, &s);
  for (i = 0; i < n; i++) {
    scanf("%d%d", &shop[i][0], &shop[i][1]);
    if (shop[i][1] != 0) shop[i][1] = 100 - shop[i][1];
    if (shop[i][0] < s) {
      lis[kindnum][0] = shop[i][0];
      lis[kindnum][1] = shop[i][1];
      kindnum++;
    }
    if (shop[i][0] == s && shop[i][1] == 0) {
      lis[kindnum][0] = shop[i][0];
      lis[kindnum][1] = shop[i][1];
      kindnum++;
    }
  }
  if (kindnum == 0) {
    printf("-1");
    return 0;
  } else {
    for (i = 0; i < kindnum; i++) {
      if (maxsw < lis[i][1]) maxsw = lis[i][1];
    }
  }
  printf("%d", maxsw);
  return 0;
}
