                  /**Bismillahir Rahmanir Rahim.**/
#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long int   ull;
typedef long long int            ll;
typedef long double              ld;
#define Faster  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pi                 acos(-1);
#define test        int t; cin>>t; while(t--)
#define dot(x)      fixed<<setprecision(x)
const double EPS = 1e-12;
bool isEqual(ld a, ld b) {
    return abs(a - b) <= EPS;
}
bool isGreater(ld a, ld b) {
    return a > b + EPS;
}
bool isSmaller(ld a, ld b) {
    return a + EPS < b;
}
// cin.ignore();
//scanf("%[^\n]%*c", str);
//sort(s,s+n,greater<int>());
//cin.getline(array,size);
//s.erase(s.begin()+s.size()-1,s.end()); last index
int main()
{
    #ifndef ONLINE_JUDGE
        clock_t tStart = clock();
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
    Faster
    ll n,m,t,a[10001],b[10001],s=0,p=0,q=0,i;
    cin>>n>>m>>t;
    s=n;
    for(i=0;i<m;i++)
    {
        cin>>a[i]>>b[i];
    }
    for(i=0;i<m;i++)
    {
        if(i==0)
        {
            if(s-a[i]<=0)
            {
                s=0;
                p=1;
            }
            else
                s=s-a[i];
            s+=(b[i]-a[i]);
            if(s>n)
                s=n;
        }
        else
        {
            s-=(a[i]-b[i-1]);
            if(s<=0)
            {
                s=0;
                p=1;
            }
            s+=(b[i]-a[i]);
            if(s>n)
                s=n;
        }
    }
    if(t-b[m-1]>=s)
        p=1;
    if(p==1)
        cout<<"No"<<endl;
    else
        cout<<"Yes"<<endl;
    
    #ifndef ONLINE_JUDGE
        fprintf(stderr, "\n>> Runtime: %.10fs\n", (double) (clock() - tStart) / CLOCKS_PER_SEC);
    #endif
}
#include <bits/stdc++.h>
using namespace std;

#define int long long
#define double long double

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n;
    int x;
    cin >> n >> x;

    int curr = 0;

    for(int i = 0; i < n; i++){
        int a, b;
        cin >> a >> b;

        curr += a*b;

        if(curr > x*100){
            cout << i+1 << endl;
            return 0;
        }
    }
    cout << "-1" << endl;
}
