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

#define mp make_pair
#define pb push_back
#define ll long long int
#define sd(x) scanf("%lld",&x)
#define sdi(x) scanf("%d",&x)
#define sdc(c) scanf("%c",&c)
#define inf 1000000000000000000ll
#define pll pair<ll,ll>
#define pii pair<int,int>
#define fastio ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define bits(x) __builtin_popcountll(x)
#define ld long double
#define test() ll test; cin>>test; while(test--)
#define fi first
#define se second
#define all(x) x.begin(),x.end()


void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif

clock_t time_p = clock();
void time_taken()
{
    time_p = clock() - time_p;
    cerr << "Time Taken : " << (float)(time_p) / CLOCKS_PER_SEC << "\n";
}



inline ll GCD(ll x, ll y) {
    if(x<y) swap(x,y);
    if(x==0) return y;
    if(y==0) return x;
    return GCD(x%y,y);
}

ll phi(ll n) {
    ll result = n;
    for (ll i = 2; i * i <= n; i++) {
        if(n % i == 0) {
            while(n % i == 0)
                n /= i;
            result -= result / i;
        }
    }
    if(n > 1)
        result -= result / n;
    return result;
}

ll power(ll x, ll n, ll mod) {
    ll res = 1;
    x %= mod;
    while(n) {
        if(n&1) {
            res = ((res*x)%mod+mod)%mod;
        }
        x = ((x*x)%mod+mod)%mod;
        n>>=1;
    }

    return res;
}

const int MOD = 1e9+7;

inline ll add(ll x, ll y, ll MOD) {
    x %= MOD;
    y %= MOD;
    ll ans = (x+y)%MOD;
    return ans;
}

inline ll mul(ll x,ll y, ll MOD) {
    x %= MOD;
    y %= MOD;
    ll ans = ((x*y)%MOD+MOD)%MOD;
    return ans;
}

int main() {
    fastio;

    ll N, X;
    cin>>N>>X;
    ll ans = 0;

    ll V,P;
    int indx = -1;
    for(int i=1;i<=N;i++) {
        cin>>V>>P;
        
        ans += V*P;
        if(ans>X*100 && indx == -1) {
            indx = i;
        }   
    }
        
    cout<<indx<<endl;
    time_taken();
}



#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <sstream>
#include <cstring>
#include <string>
#include <queue>
#include <cstdio>
#include <stack>
#include <set>
#include <map>
#include <list>
#include <iomanip>
#include <utility>
#include <tuple>
#include <functional>
#include <bitset>
#include <cassert>
#include <complex>
#include <stdio.h>
#include <time.h>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
# define ll int64_t
# define rep(i,n) for(ll i=0;i<n;i++)
# define rrep(i,n) for(ll i=1;i<=n;i++)
# define ALL(x) (x).begin(), (x).end()
# define SZ(x) ((int)(x).size())
# define pb push_back
# define mod 1000000007
# define PI 3.141592653589793
# define vec vector
#define dump(x) cerr<<#x<<"="<<x<<endl
using namespace std;

const ll MAX = 510000;
const ll MOD = 1000000007;
 
ll fac[MAX], finv[MAX], inv[MAX];
 
// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
 
// 二項係数計算
ll COM(ll n, ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

ll modpow(ll a,ll n) {
    ll res=1;
    while(n>0){
        if(n&1) res=res*a%mod;
        a = a*a%mod;
        n >>= 1;
    }
    return res;
}

ll factorial(ll n){
    ll x=1;
    rrep(i,n) x*=i;
    return x;
}

ll gcd(ll m,ll n){
    if(n==0) return m;
    return gcd(n,m%n);
}

const long long INF = 1LL << 60;

template<class T> void chmax(T& a,T b){
    if(a<b){
        a=b;
    }
}
template<class T> void chmin(T& a,T b){
    if(a>b){
        a=b;
    }
}

using Interval = pair<ll,ll>;

bool cmp(const Interval &a,const Interval &b){
    return a.second<b.second;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    ll n,m,b,fut=0;
    cin>>n>>m>>b;
    ll maxi=n;
    rep(i,m){
        ll st,fi;
        cin>>st>>fi;
        n -= st-fut;
        
        if(n <= 0){
            cout<<"No"<<endl;
            return 0;
        }
        
        if(n + fi-st > maxi) n = maxi;
        else n += fi-st;
        
        fut = fi;
    }
    n -= b-fut;
    if(n <= 0) cout<<"No"<<endl;
    else cout<<"Yes"<<endl;
    return 0;
}
