#include <bits/stdc++.h>
using namespace std;
const long long int INF = 2e18;
void null() {
  long long int n, s, i, j, k, min;
  cin >> n >> s;
  vector<pair<long long int, long long int> > v;
  for (i = 0; i < n; i++) {
    long long int x, y;
    cin >> x >> y;
    v.push_back(make_pair(x, y));
  }
  sort(v.begin(), v.end());
  if (v[0].first > s) {
    cout << -1;
    return;
  }
  if (v[0].first == s) {
    if (v[0].second == 0) {
      cout << 0;
      return;
    } else {
      cout << -1;
      return;
    }
  }
  k = n;
  for (i = 0; i < n; i++) {
    if (v[i].first > s) {
      k = i;
      break;
    }
    if (v[i].first == s) {
      if (v[i].second == 0) {
        k = i + 1;
        break;
      } else {
        k = i;
        break;
      }
    }
  }
  min = 0;
  for (j = 0; j < k; j++) {
    if (v[j].second > 0) {
      min = v[j].second;
      break;
    }
  }
  for (i = 0; i < k; i++) {
    if (min == 0) {
      cout << 0;
      return;
    }
    if (v[i].second < min && v[i].second != 0) min = v[i].second;
  }
  cout << 100 - min;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  clock_t start, end;
  start = clock();
  cout << fixed << setprecision(11);
  while (t--) {
    null();
  }
  end = clock();
  double time_taken = double(end - start) / double(CLOCKS_PER_SEC);
}
