#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
const int inf = 100100101;
const ll ll_inf = 1e9+7;
const int mod = 1000000007;
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a = b; return 1; } return 0; }

int main(){
  int n, x;
  cin >> n >> x;
  vector<int> v(n), p(n);
  rep(i,n) cin >> v[i] >> p[i];

  x *= 100;
  double al = 0;
  rep(i,n) {
    al += v[i]*p[i];
    if(al > x) {
      cout<<i+1<<endl;
      return 0;
    }
  }
  cout<<-1<<endl;

  return 0;
}

#include <bits/stdc++.h>
#include <time.h>
#include <queue>
#define ll long long int
#define mp make_pair
#define ff first
#define ss second
#define forr(i,a,n) for(ll i=a;i<n;i++)
#define ford(i,a,n) for(ll i=n-1;i>=a;i--)
#define all(v) v.begin(),v.end()
#define testc  ll ts;\
               cin>>ts;\
               while(ts--)
#define arn ll n;\
            cin>>n;\
            ll a[n];\
            forr(i,0,n)cin>>a[i];\
               
#define arr(a,n) ll a[n];\
                 forr(i,0,n)cin>>a[i];\
 
#define sss <<" "<<
#define nnn <<"\n"
#define nl cout<<"\n";
#define prtitr(v) for(auto itr=v.begin(); itr!=v.end() ; itr++)cout<<*itr<<" ";
#define fitr(v) for(auto itr=v.begin(); itr!=v.end() ; itr++)
using namespace std;
ll M=1e9+7;
ll cdiv(ll a,ll b){
    return (a%b==0)?a/b:a/b+1;
}
ll myMod(ll a, ll b){
    ll r = a % b;
    return r < 0 ? r + b : r;
}
ll ModPow(ll a,ll b,ll M)
{
    if(M==1)return 0;
    a%=M;
    ll ans=1,t=1;
    while(t>0&&t<=b)
    {
        if(t&b)
        {
            ans*=a;
            ans%=M;
        }
        t<<=1;
        a*=a;
        a%=M;
    }
    return ans;
}

ll Pow(ll a,ll b)
{
    if(M==1)return 0;
    ll ans=1,t=1;
    while(t>0&&t<=b)
    {
        if(t&b)
        {
            ans*=a;
        }
        t<<=1;
        a*=a;
    }
    return ans;
}
ll gcd(ll a, ll b) 
{ 
    if (a == 0) 
        return b; 
    return gcd(b % a, a); 
} 

int countSetBits(int n) 
{ 
    int count = 0; 
    while (n > 0) 
    { 
        count++; 
        n &= (n-1); 
    } 
    return count; 
} 
  
// Function that return count of 
// flipped number 
int FlippedCount(int a, int b) 
{ 
    // Return count of set bits in 
    // a XOR b 
    return countSetBits(a^b); 
} 

struct Point{
    int x,y;
};

bool isPrime(ll n){
    if (n <= 1)
        return false;
    for (ll i = 2; i*i <= n; i++)
        if (n % i == 0)
            return false;
    return true;
}
ll modInverse(ll n, ll p)
{
    return ModPow(n, p - 2, p);
}

ll nCrModP(ll n, ll r, ll p)
{
    if (n < r)
        return 0;
    if (r == 0)
        return 1;
 
    ll 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;
}


int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n,x;
    cin>>n>>x;
    ll v[n], p[n];
    forr(i,0,n)cin>>v[i]>>p[i];
    ll ans=-1;
    ll s=0;
    forr(i,0,n){
        s+=v[i]*p[i];
        if(s>x*100){
            ans=i;
            break;
        }
    }
    if(ans!=-1)cout<<ans + 1 nnn;
    else cout<< - 1 nnn;
       
    return 0;
} 
