// ※※※ 解答不能 ※※※
// tourist氏.
// https://atcoder.jp/contests/cf17-relay-open/submissions/8923360
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
#define repx(i, a, b) for(int i = a; i < b; i++)
#define rep(i, n) repx(i, 0, n)
#define repr(i, a, b) for(int i = a; i >= b; i--)

int main(){
    int n, p;
    scanf("%d %d", &n, &p);
    vector<int> w(n);
    vector<int> b(n);
    rep(i, n) scanf("%d %d", &w[i], &b[i]);
    vector<LL> value(n);
    LL s = 0;
    rep(i, n){
        s -= p * 1LL * b[i];
        value[i] = (100LL - p) * w[i] + p * 1LL * b[i];
    }
    sort(value.rbegin(), value.rend());
    int ans = 0;
    rep(i, n){
        if(s < 0){
            s += value[i];
            ++ans;
        }
    }
    printf("%d\n", ans);
    return 0;
}