#include<bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i,m,n) for(int i=(m);i<(n);i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define all(a) a.begin(),a.end()
#define rall(c) (c).rbegin(),(c).rend()
#define mp make_pair
#define endl '\n'
#define vec vector<ll>
#define mat vector<vector<ll> >
#define fi first
#define se second
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef long double ld;
typedef complex<double> Complex;
const ll INF=1e9+7;
const ll inf=INF*INF;
const ll mod=998244353;
const ll MAX=110;



signed main(){
    ll n,x;cin>>n>>x;
    ll sum=0;
    x*=100LL;
    rep(i,n){
        ll v,p;cin>>v>>p;
        sum+=v*p;
        if(sum>x){
            cout<<i+1<<endl;
            return 0;
        }
    }
    if(sum<=x){
        cout<<-1<<endl;
    }
}
    #include <bits/stdc++.h>

    // #include <ext/pb_ds/assoc_container.hpp>
    // #include <ext/rope>
    // #include <ext/pb_ds/tree_policy.hpp>
    // #include <ext/pb_ds/trie_policy.hpp>
    // using namespace __gnu_pbds;
    // using namespace __gnu_cxx;
    // typedef tree<long long, null_type, std::less<long long>, rb_tree_tag, tree_order_statistics_node_update> pbds;
    // typedef trie<std::string,null_type,trie_string_access_traits<>,pat_trie_tag,trie_prefix_search_node_update>Trie;

    using namespace std;
    #define rep(i,a,n) for (int i=a;i<n;i++)
    #define per(i,a,n) for (int i=n-1;i>=a;i--)
    #define pb push_back
    #define mp make_pair
    #define all(x) (x).begin(),(x).end()
    #define fi first
    #define se second
    #define sz(x) ((int)(x).size())
    #define rdv(x) long long x; cin>>x;
    #define deb(x) cout<<#x<<"="<<x<<endl;
    #define inf 1e18
    #define endl "\n"

    typedef vector<long long> vll;
    typedef long long ll;
    typedef pair<long long,long long> pii;
    typedef long double ld;
    mt19937 mrand(random_device{}());
    const ll mod=1000000007;
    int rnd(int x) { return mrand() % x;}
    ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
    ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
    bool prime[200001];
    void SieveOfEratosthenes()
    {
        memset(prime, true, sizeof(prime));
        prime[1]=false;
        for (int p=2; p*p<=200000; p++)
        {
            if (prime[p] == true)
            {
                for (int i=p*p; i<=200000; i += p)
                    prime[i] = false;
            }
        }
        return;
    }

    ll ceil(ll x,ll y)
    {
        ll ans=x/y;
        if(x%y)
            ans++;

        return ans;
    }

    void file_i_o(){
        #ifndef ONLINE_JUDGE
            freopen("input.txt","r",stdin);
            freopen("output.txt","w",stdout);
        #endif
    }

    void YN(bool flag)
    {
        if(flag)
            cout<<"Won";
        else
            cout<<"Lost";
    }

    // head

    void solve()
    {
        ll n,x;
    
        cin>>n>>x;

        ll con=0;
        ll ans=-1;
        rep(i,0,n)
        {
            ll a,b;
            cin>>a>>b;

            con+=(a*b);
            if(con>x*100)
            {
                ans=i+1;
                break;
            }
        }

        cout<<ans;



        cout<<"\n";
    }
    int main()
    {
        ios_base::sync_with_stdio(false); 			//Used to reduce the time
        cin.tie(NULL);
        cout.tie(NULL);

        file_i_o();

        ll T=1;
        //cin>>T;
        //ll temp=T;
        while(T--)
        {   
            //cout<<"Case #"<<temp-T<<": ";
            solve();
        }
        cerr<<"Time : "<<1000*((double)clock())/(double)CLOCKS_PER_SEC<<" ms\n";
    }
