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

#define int long long

#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;

template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}

signed main(){
    int N,P;
    cin>>N>>P;

    int sb=0;
    vint v;
    rep(i,N){
        int w,b;
        cin>>w>>b;
        sb+=b;
        v.pb((100-P)*w+P*b);
    }

    sort(all(v));reverse(all(v));
    int sum=0;
    rep(i,N){
        sum+=v[i];
        if(sum>=P*sb){
            cout<<i+1<<endl;
            return 0;
        }
    }
    return 0;
}
