#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using namespace std;
template<class S,class T> ostream& operator<<(ostream& o,const pair<S,T> &p){return o<<"("<<p.fs<<","<<p.sc<<")";}
template<class T> ostream& operator<<(ostream& o,const vector<T> &vc){o<<"sz = "<<vc.size()<<endl<<"[";for(const T& v:vc) o<<v<<",";o<<"]";return o;}
using ll = long long;
int main(){
	int N,P;
	cin>>N>>P;
	ll sumb = 0;
	vector<ll> vs;
	rep(i,N){
		ll w,b;
		cin>>w>>b;
		sumb += b;
		vs.pb(P*b+(100-P)*w);
	}
	sort(all(vs),greater<ll>());
	ll sum = 0;
	rep(i,N){
		sum += vs[i];
		if(sum >= P*sumb){
			cout<<i+1<<endl;
			return 0;
		}
	}
}
