#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long a,i=0,j=0;
    double b,s=0,y=100;
  cin>>a>>b;
   int c[a],d[a];
  for(i=0;i<a;i++){
    cin>>c[i];
    cin>>d[i];
  }
  for(i=0;i<a;i++)
    {
    s+=c[i]*d[i];
    if(s>b*y){
        j=1;
        cout<<i+1<<endl;
        break;
    }
    }
    if(j==0){
        cout<<-1<<endl;
    }
    return 0;
  }

#include<bits/stdc++.h>
using namespace std;
#define For(i,a,b) for(int i=(a),(i##i)=(b);i<=(i##i);++i)
#define Rep(i,n) for(int i=0,(i##i)=(n);i<(i##i);++i)
#define Fodn(i,a,b) for(int i=(a),(i##i)=(b);i>=(i##i);--i)
#define pln puts("")
#define il inline
#define ff first
#define ss second
using LL=long long;using u32=unsigned int;using u64=unsigned LL;using LD=long double;
template<typename T>using pii=pair<T,T>;
template<typename T>il bool read(T&x){
x=0;char c=getchar();int f=1;while(!isdigit(c)&&(c!='-')&&(c!=EOF))c=getchar();
if(c==EOF)return 0;if(c=='-')f=-1,c=getchar();
while(isdigit(c)){x=(x<<1)+(x<<3)+(c&15);c=getchar();}x*=f;return 1;}
template<typename T,typename...Args>
il bool read(T&x,Args&...args){bool res=1;res&=read(x);res&=read(args...);return res;}
const int M=1000000007,INF=0x3f3f3f3f;const LL INFLL=0x3f3f3f3f3f3f3f3fLL;
const int N=1000010;const double EPS=1e-6;

int n,x;
bool f=0;
LL now;
inline void init(){
    read(n,x);x*=100;
    For(i,1,n){
        LL u,v;read(u,v);now+=u*v;
        if(now>x){
            f=1;printf("%d\n",i);break;
        }
    }
}
inline void solve(){
    if(!f)puts("-1");
}
signed main(){
    init();solve();
    return 0;
}