#include <bits/stdc++.h>
#define MAX 1000005
#define M 1000000000
using namespace std;
#define ll long long int
// bool prime[MAX+1];
// ll ans[MAX];

// void seive()
// {


//     memset(prime, true, sizeof(prime));

//     for (int p=2; p*p<=MAX; p++)
//     {

//         if (prime[p] == true)
//         {

//             for (int i=p*p; i<=MAX; i += p)
//                 prime[i] = false;
//         }
//     }
// }
// void solve()
// {
	 
// }
int main()
{
	int n, ans = -1;
  ll x, c = 0;
  cin >> n >> x;
  x *= 100;
  for (int i = 1; i <= n; i++) {
    ll v, p;
    cin >> v >> p;
    c += v * p;
    if (c > x && ans == -1) ans = i;
  }
  cout << ans << endl;
	return 0;
}
#include <iostream>
#include <sstream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <queue>
#include <string>
#include <cstring>
#include <cassert>
#include <iomanip>
#include <algorithm>
#include <set>
#include <map>
#include <ctime>
#include <cmath>

using namespace std;

#define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int long long
#define endl '\n'

#define sz(v) int(v.size())
#define all(v) v.begin(), v.end()
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define pt pair<int, int>

#define forf(i, a, b) for (int i = (a); i < (b); i++)
#define forb(i, a, b) for (int i = (b); i >= (a); i--)
#define fo(i, n) forf(i, 0, n)
#define fob(i, n) forb(i, 0, n - 1)

template<typename X> inline X abs(const X& a) { return a < 0? -a: a; }
template<typename X> inline X sqr(const X& a) { return a * a; }

typedef vector<int> vi;
typedef pair<int,int> pii;
typedef vector<vector<int>> vvi;
typedef vector<pair<int, int>> vpii;

using namespace std;

const int INF = 1000 * 1000 * 1000;
const int EPS = 1e-9;
const int PI = acos(-1.0);

int32_t main () {
    fastio
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    cerr << setprecision(10) << fixed;
    int n,x;
    cin >> n >> x;
    x = x*100;
    vi a;
    forf(i,0,n)
    {
        int v,p;
        cin >> v >> p;
        a.pb(v*p);
    }
    int sum = 0;
    forf(i,0,n)
    {
        sum += a[i];
        if(sum > x)
        {
            cout << i + 1 << endl;
            return 0;
        }
    }
    cout << -1 << endl;
    return 0;
}
