/*HAR HAR MAHADEV
ヽ｀、ヽ｀｀、ヽ｀ヽ｀、、ヽ ｀ヽ 、ヽ｀🌙｀ヽヽ｀ヽ、ヽ｀
ヽ｀、ヽ｀｀、ヽ 、｀｀、 ｀、ヽ｀ 、｀ ヽ｀ヽ、ヽ ｀、ヽ｀｀、
ヽ、｀｀、｀、ヽ｀｀、 、ヽヽ｀、｀、、ヽヽ、｀｀、 、 ヽ｀、
ヽ｀｀、 ヽ｀ヽ｀、、ヽ ｀ヽ 、 🚶ヽ｀｀｀｀ヽヽヽ｀、、ヽ｀、、ヽ*/
//think twice code once
//when its getting hard why you started
# include   <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

typedef pair<int, int> pi;
typedef pair<ll, ll> pl;

typedef vector<int> vi;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<pi> vpi;//typedef for datatype and #define for macro

# define    fast                ios_base::sync_with_stdio(false);cin.tie(NULL);
# define    MOD                 1000000007
# define    endl                '\n'
# define    FOR(i, a, b)        for (int i=a; i<(b); i++)
# define    F0R(i, a)           for (int i=0; i<(a); i++)
# define    FORd(i,a,b)         for (int i = (b)-1; i >= a; i--)
# define    F0Rd(i,a)           for (int i = (a)-1; i >= 0; i--)
# define    INF                 9e18
# define    PI                  3.14159265358979323846
# define    lb                  lower_bound
# define    ub                  upper_bound
# define    mp                  make_pair
# define    pb                  push_back
# define    fi                  first
# define    se                  second
# define    all(a)              a.begin(), a.end()
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main()
{
    fast;
    ll t = 1;
    // cin >> t;
    while (t--)
    {
        ll n, x, i, ans = -1, sum = 0;
        cin >> n >> x;
        vector<pair<ll, ll>> v;
        for (i = 0; i < n; i++)
        {
            ll a, b; cin >> a >> b;
            v.emplace_back(a, b);
        }
        for (i = 0; i < n; i++)
        {
            sum += (v[i].fi * v[i].se);
            if (sum > 100 * x)
            {
                ans = i + 1;
                break;
            }
        }
        cout << ans << endl;
    }
    return 0;
}
/* stuff you should look for
* stack/set/gcd/palindrome/twopointer/slidingwindow
prefix sum/range query/ patterns/matrices/string
lexographicaly/xoor/subsequence subarray/overlapping intervals
factors(rootn)   primefactorisation  vectorofallfactors dfs bfs msdfs

availaible snip-dfs,mint,quadraticformula,2dvector
mytemp,negativemod,primefactorisation
  * int overflow, array bounds
  * special cases (n=1?)
  * do smth instead of nothing and stay organized
  * WRITE STUFF DOWN
  * DON'T GET STUCK ON ONE APPROACH
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define vec vector
#define rep(i,n) for (int i=0; i<(n); i++)
#define print(a) cout << a << endl
#define fix(n) fixed << setprecision(n)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define Yes "Yes"
#define YES "YES"
#define No "No"
#define NO "NO"


int main() {
  int N;
  ll X;
  cin >> N >> X;
  X *= 100;
  rep(i,N) {
    ll V,P;
    cin >> V >> P;
    X -= V*P;
    if (X<0) {
      print(i+1);
      return 0;
    }
  }
  print(-1);
  return 0;
}