#include <bits/stdc++.h>
using namespace std;
float max(long long a, long long b) {
  if (a > b)
    return (float)a;
  else
    return (float)b;
}
int min(int a, int b) {
  if (a < b)
    return a;
  else
    return b;
}
void solve() {}
int main() {
  int n, s;
  cin >> n >> s;
  int max = 0, fl = 0;
  while (n--) {
    int x, y;
    cin >> x >> y;
    int y1 = (!y ? y : 100 - y);
    if (x < s) {
      max = (max > y1 ? max : y1);
      fl++;
    }
    if (x == s && (!y)) fl++;
  }
  if (!fl)
    cout << "-1";
  else
    cout << max;
  return 0;
}
