#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#include <queue>
#include <map>
#include <unordered_map>
#include <set>
#include <functional>
using namespace std;

typedef long long ll;

ll w[100005], b[100005];
priority_queue<pair<ll, int>> pq;

int main() {
	int n, p; cin >> n >> p;
	ll blue = 0, white = 0;
	for (int i = 0; i < n; ++i) {
		cin >> w[i] >> b[i];
		blue += b[i];
		pq.push({ (100 - p)*w[i] + p*b[i], i });
	}
	int ans = 0;
	while ((100 - p)*white < p*blue) {
		pair<ll, int> s = pq.top(); pq.pop();
		int arg = s.second;
		blue -= b[arg];
		white += w[arg];
		++ans;
	}
	cout << ans << endl;
	return 0;
}