import std.stdio, std.string, std.conv, std.algorithm, std.numeric;
import std.range, std.array, std.math, std.typecons, std.container, core.bitop;

void main() {
    int n, p;
    scan(n, p);

    auto w = new int[](n);
    auto b = new int[](n);

    foreach (i ; 0 .. n) {
        scan(w[i], b[i]);
    }

    auto f = new long[](n);

    foreach (i ; 0 .. n) {
        f[i] = 1L * (100 - p) * w[i] + 1L * p * b[i];
    }

    f.sort!"a > b"();

    long v;
    long bs = b.sum(0L);

    foreach (i ; 0 .. n) {
        v += f[i];

        if (v >= 1L * p * bs) {
            writeln(i + 1);
            return;
        }
    }
}


void scan(T...)(ref T args) {
    string[] line = readln.split;
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}


void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}