#include <bits/stdc++.h>
using namespace std;
pair<long long int, long long int> p[101];
int main() {
  long long int n, k, f, s, check = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> p[i].second >> p[i].first;
  }
  sort(p, p + n);
  for (int i = 0; i < n; i++) {
    if (p[i].second <= k) {
      if (p[i].first == 0) check = 1;
      if (p[i].first != 0 && p[i].second < k) {
        cout << 100 - p[i].first;
        return 0;
      }
    }
  }
  if (check == 1)
    cout << 0;
  else
    cout << -1;
  return 0;
}
