#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s;
  while (~scanf("%d%d", &n, &s)) {
    int ans = 101;
    for (int i = 0; i < n; i++) {
      int x, y;
      scanf("%d%d", &x, &y);
      if (x <= s) {
        if (x == s && y > 0) y = 102;
        if (y == 0) y = 100;
        ans = min(y, ans);
      }
    }
    if (ans > 100)
      printf("-1\n");
    else
      printf("%d\n", 100 - ans);
  }
  return 0;
}
