#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define vll vector<ll>
#define vvll vector<vll>
#define mll map<ll,ll>
#define f(i,m,n) for(i=m;i<n;i++)
#define ee endl
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define take(v,n) for(i=0;i<n;i++) cin>>v[i];
#define print(v,n) for(i=0;i<n;i++) cout<<v[i]<<" ";
#define No cout<<"NO"<<endl;return
#define Yes cout<<"YES"<<endl;return
#define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define sot(v) sort(v.begin(),v.end());
#define PI 3.14159265   ;
ll mod =1e9+7;
bool isPrime(int n)
{
    if (n <= 1)  return false;
    if (n <= 3)  return true;
    if (n % 2 == 0 || n % 3 == 0) return false;
    for (int i = 5; i*i <= n; i = i + 6)
        if (n%i == 0 || n % (i + 2) == 0)
            return false;
    return true;
}
ll powe(ll x, ll y) {
    ll res = 1;
    while (y > 0) {
        if (y & 1) res =( res * x)%mod;
        y = y >> 1;
        x = (x * x)%mod;
    }
    return res;
}
struct hash_pair {
    template <class T1, class T2>
    size_t operator()(const pair<T1, T2>& p) const
    {
        auto hash1 = hash<T1>{}(p.first);
        auto hash2 = hash<T2>{}(p.second);
        return hash1 ^ hash2;
    }
};
unsigned long long power(unsigned long long x, int y, int p)
{
    unsigned long long res = 1; // Initialize result
 
    x = x % p; // Update x if it is more than or
    while (y > 0) 
    {
        if (y & 1) res = (res * x) % p;
        y = y >> 1; // y = y/2
        x = (x * x) % p;
    }
    return res;
}
unsigned long long modInverse(unsigned long long n,int p)
{
    return power(n, p - 2, p);
}
unsigned long long nCrModPFermat(unsigned long long n,int r, int p)
{
    if (n < r)
        return 0;
    // Base case
    if (r == 0)
        return 1;
    unsigned long long fac[n + 1];
    fac[0] = 1;
    for (int i = 1; i <= n; i++)
        fac[i] = (fac[i - 1] * i) % p;
 
    return (fac[n] * modInverse(fac[r], p) % p
            * modInverse(fac[n - r], p) % p)
           % p;
}

void solve()
{
    ll i, x,m, y, j, k, h, n, w, k1, k2,k3,q;
    cin>>n>>x;
    x*=100;
    ll sum=0;
    for(i=0;i<n;i++)
    {
        cin>>k1>>k2;
        ll temp=k1*k2;
        sum+=temp;
        //cout<<sum<<ee;
        if(sum>x)
        {
            cout<<i+1<<ee;
            return;
        }
        
    }
    cout<<-1;
}

int main() {
    #ifndef ONLINE_JUDGE 
        freopen("input.txt", "r", stdin); 
        freopen("output.txt", "w", stdout); 
    #endif
    fast;
    ll i, j, l, k, t, n;
    t=1;
    for (i = 1; i <= t; i++)
    {
        //cout<<"Case #"<<i<<": ";
        solve();
    }
}
// 
#include <iostream>
using namespace std;

int main(){
	int n, t=0, x; double s;
	cin >> n >> s;
	s = (int)s*100;
	int a[n+1]={0}, b[n+1]={0};
	
	for (int i=1; i<=n; i++)
		cin >> a[i] >> b[i];
		
	for (int i=1; i<=n; i++){
		x = a[i]*b[i];
		t += x;
		if (t > s){
			cout << i << endl; return 0;
		}
	}
	
	cout << -1 << endl;
	return 0;
}