#include <bits/stdc++.h>
 
using namespace std;
 
#define lli long long int
#define REP(i,s,l) for(lli i=s;i<l;i++)
#define DEBUG 0
#define INF (1LL<<50)
#define MOD 1000000007

lli n,p;

bool comp(const pair<lli,lli> &a,const pair<lli,lli> &b){
	return (a.first*(100-p) + a.second*p) < (b.first*(100-p) + b.second*p);
}

signed main(){

	cin>>n>>p;

	vector<pair<lli,lli>> v;

	lli sumW = 0;
	lli sumB = 0;
	REP(i,0,n){
		lli w,b;
		cin>>w>>b;
		sumB += b;
		v.push_back(make_pair(w,b));
	}
	sort(v.rbegin(),v.rend(),comp);

	if(DEBUG){
		REP(i,0,n)cout<<v[i].first<<" "<<v[i].second<<endl;
	}

	for(lli i=0;i<n;i++){
		sumB -= v[i].second;
		sumW += v[i].first;

		if(sumW*100 /(double)(sumW+sumB) >= p){
			cout<<i+1<<endl;
			return 0;
		}
	}

	return 0;
}