#include <bits/stdc++.h>
using namespace std;
int n, s, t1, t2;
pair<int, int> mp[1000];
int main() {
  scanf("%d %d", &n, &s);
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &mp[i].first, &mp[i].second);
  }
  int mm = -100000;
  bool ans = false;
  for (int i = 0; i < n; i++) {
    if (mp[i].first < s && mp[i].second >= 0) {
      if (mp[i].second == 0) {
        mm = max(mm, 0);
        ans = true;
      } else {
        mm = max(mm, (100 - mp[i].second));
        ans = true;
      }
    } else if (mp[i].first == s && mp[i].second == 0) {
      mm = max(0, mm);
      ans = true;
    }
  }
  if (ans) {
    printf("%d\n", mm);
  } else {
    printf("-1\n");
  }
  return 0;
}
