#include "bits/stdc++.h"

using namespace std;

void solve()
{
	int N, P;
	cin >> N >> P;
	double res = 0;
	vector<double> ps(N);
	for (int i = 0; i < N; i++)
	{
		double w, b;
		cin >> w >> b;
		ps[i] = ((100 - P) * w + P * b) / 100;
		res -= P * b / 100;
	}
	sort(ps.rbegin(), ps.rend());
	int ans = 0, idx = -1;
	while(res + ps[idx+1] < 0 && idx < N)
	{
		ans++;
		res += ps[++idx];
	}
	ans++;
	cout << ans << endl;
}

int main(void)
{
	solve();
	//cout << "yui(*-v・)yui" << endl;
	return 0;
}
