#include <bits/stdc++.h>
using namespace std;
struct node {
  int d;
  int c;
} s[1000010];
bool cmp(node x, node y) {
  if (x.c == y.c)
    return x.d < y.d;
  else
    return x.c < y.c;
}
int main() {
  int n, m, t, k, p, i, j;
  scanf("%d%d", &n, &m);
  {
    for (i = 1; i <= n; i++) {
      scanf("%d%d", &s[i].d, &s[i].c);
    }
    sort(s + 1, s + n + 1, cmp);
    bool flag = true;
    for (i = 1; i <= n; i++) {
      if (s[i].d < m && s[i].c) {
        cout << 100 - s[i].c << endl;
        flag = false;
        break;
      }
    }
    if (flag) {
      for (i = 1; i <= n; i++) {
        if (s[i].d < m || s[i].d == m && !s[i].c) {
          cout << "0" << endl;
          flag = false;
          break;
        }
      }
    }
    if (flag) cout << "-1" << endl;
  }
  return 0;
}
