/*

    author: l_a_k_s_h_g
    
*/

#include <bits/stdc++.h>
#define ll long long 
#define pb push_back
#define f(a,b) for(ll i=a;i<b;i++)
#define mod 1000000007
#define inf 1e9 + 1
#define all(x) (x).begin(),(x).end()
#define prDouble(x,dec) cout << fixed << setprecision(dec) << x
#define triplet pair<ll,pair<ll,ll> >
#define prCase(t) cout << "Case #" << t <<": "
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define endl "\n" 

using namespace std;



int main(){
    fast
 
ll n;
ll x;
cin>>n>>x;
x *= 100;
ll k=0;
f(0,n){
    
    ll g,h;
    cin>>g>>h;
    
    k += g*h;
    
    if(k > x){
        cout<<i+1<<endl;
        break;
    }
    
}

if(k <= x){
    cout<<-1<<endl;
}





    return 0;
    
     
    
}
#include <bits/stdc++.h>
 
 
using namespace std;
 
typedef long long ll;
 
#define rep(i,a,b) for(ll i=a;i<b;++i)
#define rrep(i,a,b) for(ll i=a;i>b;--i)
#define FOR(i,n)  for(ll i=0;i<n;i++)
#define vi vector<int>
#define vl vector<ll>
#define ld long double
#define vld vector<ld>
#define vvi vector<vector<int>>
#define vvl vector<vector<long long>>
#define vvld vector<vector<ld>>
#define pii pair<int,int>
#define pll pair<long,long>
#define vpii vector<pii>
#define vpll vector<pll>
#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define bs binary_search
#define d1(x) cout<<(x)<<endl
#define d2(x,y) cout<<(x)<<" "<<(y)<<endl
#define d3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<endl
#define d4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<endl
#define max3(a,b,c) max(max(a,b),c)
#define min3(a,b,c) min(min(a,b),c)

ll inf = 1e18;
ll mod = 1e9+7;

ll power(ll x, ll y, ll p)
{
    ll res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res * x) % p;
        y = y >> 1;
        x = (x * x) % p;
    }
    return res;
}
ll pwr(ll x, ll y)
{
    ll res = 1;
    x = x ;
    while (y > 0)
    {
        if (y & 1)
            res = (res * x) ;
        y = y >> 1;
        x = (x * x) ;
    }
    return res;
}
ll modInverse(ll n, ll p)
{
    return power(n, p - 2, p);
}
ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
 
}
ll fact(ll n) 
{ 
    if (n <= 1) 
        return 1; 
    return n*fact(n-1); 
} 
ll nPr(ll n, ll r) 
{ 
    return fact(n)/fact(n-r); 
} 
ll ceil(ll n, ll k)
{
    if(n%k==0)
        return n/k;
    else
        return n/k + 1;
}
int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll t;
    // cin>>t;
    t = 1;
    while(t-->0)
    {
        ll n, x, sum=0, i=0;
        cin>>n>>x;
        for(i=0; i<n; i++)
        {
            ll v,p;
            cin>>v>>p;
            sum+=(v*p);
            if(sum>x*100)
            {
                break;
            }
        }
        if(sum>x*100)
            d1(i+1);
        else
            d1(-1);
    }
    return 0;
}