//  /Applications/Geany.app/Contents/MacOS/geany
#include<bits/stdc++.h>

using namespace std;

#define int long long
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define pairii pair<int,int>
#define ff first
#define ss second
#define all(x) x.begin(),x.end()

const int N = 10000000;
vector<int> lp(N+1,0);
vector<int> pr;
void primefactor();
int binpow(int a, int b);
int binpow(int a, int b, int mod);
int gcd(int a, int b);
int lcm (int a, int b);
bool comp(int a, int b);
int inversemod(int a, int mod);

void test()
{
	int n,x,i,j;
	cin>>n>>x;
	x*=100;
	vector<pairii> pre(n);
	for(i=0;i<n;i++) cin>>pre[i].ff>>pre[i].ss;

	double sum=0;
	for(i=0;i<n;i++)
	{
		sum+=pre[i].ss*pre[i].ff;
		if(sum>x)
		{
			cout<<i+1<<endl;
			return;
		}
	}
	cout<<-1<<endl;

}

signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	int t=1;
	//cin>>t;
	while(t--) test();
	return 0;
}


void primefactor()
{
	for (int i=2; i<=N; ++i) {
		if (lp[i] == 0) {
			lp[i] = i;
			pr.push_back (i);
		}
		for (int j=0; j<(int)pr.size() && pr[j]<=lp[i] && i*pr[j]<=N; ++j)
			lp[i * pr[j]] = pr[j];
	}
}

int binpow(int a, int b)
{
    int res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}

int binpow(int a, int b, int mod)
{
    int res = 1;
    while (b > 0) {
        if (b & 1)
            res = (res * a)%mod;
        a = (a * a)%mod;
        b >>= 1;
    }
    return res%mod;
}

int gcd(int a, int b)
{
	if(b==0) return a;
	else return gcd(b,a%b);
}

int lcm (int a, int b)
{
    return a / gcd(a, b) * b;
}

bool comp(int a, int b)
{
	return a>b;
}

int inversemod(int a, int mod)
{
	return binpow(a,mod-2, mod);
}

#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, from, to) for (ll i = from; i < (to); ++i)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define sz(x) (int)(x).size()
#define pb push_back
using ll = long long;
using ld=long double;
using vin=vector<int>;
using vvin=vector<vin>;
using vll=vector<ll>;
using vvll=vector<vll>;
using vst=vector<string>;
using P = pair<ll,ll>;
using vp=vector<P>;
using vvp=vector<vp>;
const int inf=1e9+7;
const ll INF=9e18/2;
const long double PI = acos(-1.0); 
template <typename T> bool chmin(T &a, const T& b){if(a > b){a = b;return true;}return false;}
template <typename T> bool chmax(T &a, const T& b){if(a < b){a = b;return true;}return false;}
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
const int dx[4] = { 1, 0, -1, 0 };
const int dy[4] = { 0, 1, 0, -1 };

int main(){//cout<<fixed<<setprecision(20);
  ll n,x;
  cin>>n>>x;
  x*=100;
  rep(i,0,n){
    ll v,p;
    cin>>v>>p;
    x-=v*p;
    if(x<0){
      cout<<i+1<<endl;
      return 0;
    }
  }
  cout<<-1<<endl;
}