#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <set>
#include <queue>
#include <stack>
using namespace std;
typedef long long int ll;

ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}

void P(int x) {cout << x << endl;}
void P(long x) {cout << x << endl;}
void P(double x) {cout << x << endl;}
void P(ll x) {cout << x << endl;}
void P(string x) {cout << x << endl;}
void P(char x) {cout << x << endl;}

#define YES cout << "YES" << endl
#define Yes cout << "Yes" << endl
#define NO cout << "NO" << endl
#define No cout << "No" << endl

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define drep(i, n) for(int i = n - 1; i >= 0; i--)

const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;

int main() {
  double n, x;
  cin >> n >> x;
  x = x * 100;
  int ans = 0;
  int flag = 0;
  double sum = 0;
  rep (i, n) {
    double v, p;
    cin >> v >> p;
    sum += v * p;
    if (flag == 0 && sum > x) {
      ans = i + 1;
      flag = 1;
    }
  }
  if (flag == 0) P(-1);
  else P(ans);
  return 0;
}
/*
--------------------------------------------------
------------                          ------------

.Code by sonjaewon.

------------                          ------------
--------------------------------------------------
*/


#include <bits/stdc++.h>
using namespace std;

int main()
{
    cin.tie(0); cout.tie(0);
    ios_base::sync_with_stdio(false);

    int n, k; cin >> n >> k;
    k *= 100;
    int water = 0, cnt = 0;
    for(int i = 0; i < n; i++)
    {
        int a, b; cin >> a >> b;
        water += a * b;
        cnt++;
        if(water > k)
        {
            cout << cnt;
            return 0;
        }
    }
    cout << -1;
}
