#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
bool compare(const pair<int, int> &l, const pair<int, int> &r) {
  return l.second < r.second;
}
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  vector<pair<int, int> > v;
  int a, b;
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &a, &b);
    v.push_back(make_pair(a, 100 - b));
  }
  sort(v.begin(), v.end(), compare);
  int ans = -1;
  for (int i = n - 1; i >= 0; i--) {
    if (v[i].first < m && v[i].second < 100) {
      ans = v[i].second;
      break;
    } else if (v[i].second == 100 && v[i].first <= m) {
      ans = 0;
    }
  }
  cout << ans << endl;
  return 0;
}
