#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, S, s[110][2], i, ans = 0, m1 = 1;
  cin >> n >> S;
  for (i = 0; i < n; ++i) {
    cin >> s[i][0] >> s[i][1];
    if (s[i][1])
      ++s[i][0];
    else
      s[i][1] = 100;
  }
  for (i = 0; i < n; ++i)
    if (s[i][0] <= S) m1 = 0;
  if (m1) {
    cout << -1;
    return 0;
  }
  for (i = 0; i < n; ++i)
    if (s[i][0] <= S) ans = ((ans < 100 - s[i][1]) ? 100 - s[i][1] : ans);
  cout << ans;
  return 0;
}
