Problem: Ringo Kingdom Congress is voting on a bill.

N members are present, and the i-th member (1 ≤ i ≤ N) has w_i white ballots and b_i blue ballots. Each member i will put all the w_i white ballots into the box if he/she is in favor of the bill, and put all the b_i blue ballots into the box if he/she is not in favor of the bill. No other action is allowed. For example, a member must not forfeit voting, or put only a part of his/her white ballots or a part of his/her blue ballots into the box.

After all the members vote, if at least P percent of the ballots in the box is white, the bill is passed; if less than P percent of the ballots is white, the bill is rejected.

In order for the bill to pass, at least how many members must be in favor of it?

Constraints

* 1 ≤ N ≤ 10^5
* 1 ≤ P ≤ 100
* 1 ≤ w_i ≤ 10^9
* 1 ≤ b_i ≤ 10^9
* All input values are integers.

Input

Input is given from Standard Input in the following format:


N P
w_1 b_1
w_2 b_2
:
w_N b_N


Output

Print the minimum number of members in favor of the bill required for passage.

Examples

Input

4 75
1 1
1 1
1 1
1 1


Output

3


Input

4 75
1 1
1 1
1 1
100 1


Output

1


Input

5 60
6 3
5 9
3 4
7 8
4 7


Output

3

Solution (in CPP):

Solution:
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

//template
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(a);i>(b);i--)
#define ALL(v) (v).begin(),(v).end()
#define UNIQUE(v) sort(ALL(v)),v.erase(unique(ALL(v)), v.end());
typedef long long int ll; typedef pair<ll, ll> P; typedef complex<double> com;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int inf = INT_MAX / 2; const ll INF = LLONG_MAX / 2;
const int mod = 1e9 + 7; //998244353;
struct Mint {
	int val;
	Mint inv() const {
		unsigned tmp, a = val, b = mod; int x = 1, y = 0;
		while (b) tmp = a / b, a -= tmp * b, swap(a, b), x -= tmp * y, swap(x, y);
		return Mint(x);
	}
public:
	Mint() :val(0) {}
	Mint(ll x) :val(x >= 0 ? x % mod : x % mod + mod) {}
	int mtoi() { return this->val; }
	Mint pow(ll t) { Mint res = 1; while (t > 0) { if (t & 1) res *= *this; *this *= *this; t >>= 1; }return res; }
	Mint& operator+=(const Mint& x) { if ((val += x.val) >= mod) val -= mod; return *this; }
	Mint& operator-=(const Mint& x) { if ((val += mod - x.val) >= mod) val -= mod; return *this; }
	Mint& operator*=(const Mint& x) { val = (ll)val * x.val % mod; return *this; }
	Mint& operator/=(const Mint& x) { return *this *= x.inv(); }
	bool operator==(const Mint& x) const { return val == x.val; }
	bool operator!=(const Mint& x) const { return val != x.val; }
	bool operator<(const Mint& x) const { return val < x.val; }
	bool operator<=(const Mint& x) const { return val <= x.val; }
	bool operator>(const Mint& x) const { return val > x.val; }
	bool operator>=(const Mint& x) const { return val >= x.val; }
	Mint operator-() const { return Mint(-val); }
	Mint operator+(const Mint& x) const { return Mint(*this) += x; }
	Mint operator-(const Mint& x) const { return Mint(*this) -= x; }
	Mint operator*(const Mint& x) const { return Mint(*this) *= x; }
	Mint operator/(const Mint& x) const { return Mint(*this) /= x; }
};
struct factorial {
	vector<Mint> Fact, Finv;
public:
	factorial(int maxx) {
		Fact.resize(maxx + 1, Mint(1)); Finv.resize(maxx + 1);
		rep(i, 0, maxx) Fact[i + 1] = Fact[i] * Mint(i + 1);
		Finv[maxx] = Mint(1) / Fact[maxx];
		rrep(i, maxx, 0) Finv[i - 1] = Finv[i] * Mint(i);
	}
	Mint fact(int n) { return Fact[n]; }
	Mint finv(int n) { return Finv[n]; }
	Mint nCr(int n, int r) {
		if (n < 0 || n < r || r < 0) return Mint(0);
		return Fact[n] * Finv[r] * Finv[n - r];
	}
	Mint nPr(int n, int r) {
		if (n < 0 || n < r || r < 0) return Mint(0);
		return Fact[n] * Finv[n - r];
	}
};
class UnionFind {
	vector<int> par;
public:
	UnionFind(int n) { par = vector<int>(n, -1); }
	int root(int a) {
		if (par[a] < 0) return a;
		else return par[a] = root(par[a]);
	}
	int size(int a) { return -par[root(a)]; }
	bool connect(int a, int b) {
		a = root(a), b = root(b);
		if (a == b) return false;
		if (size(a) < size(b)) swap(a, b);
		par[a] += par[b], par[b] = a;
		return true;
	}
};
struct edge { int u, v, cost; };
vector<ll>dijkstra(vector<vector<edge>> Grp, int s) {
	priority_queue<P, vector<P>, greater<P> > que;
	vector<ll> dist(Grp.size(), INF); dist[s] = 0; que.push(P(0, s));
	while (!que.empty()) {
		P p = que.top(); que.pop();
		int v = p.second; if (dist[v] < p.first) continue;
		rep(i, 0, Grp[v].size()) {
			edge e = Grp[v][i];
			if (dist[e.v] > dist[v] + e.cost) {
				dist[e.v] = dist[v] + e.cost;
				que.push(P(dist[e.v], e.v));
			}
		}
	} return dist;
}
ll merge_cnt(vector<int> a) {
	ll n = a.size(), ai = 0, bi = 0, ci = 0, cnt = 0;
	if (n <= 1) return 0;
	vector<int> b(a.begin(), a.begin() + n / 2);
	vector<int> c(a.begin() + n / 2, a.end());
	cnt += merge_cnt(b) + merge_cnt(c);
	while (ai < n) {
		if (bi < b.size() && (ci == c.size() || b[bi] <= c[ci]))a[ai++] = b[bi++];
		else cnt += n / 2LL - bi, a[ai++] = c[ci++];
	}
	return cnt;
}
//template end



int main() {
	int n,p; cin>>n>>p;
	vector<int> w(n),b(n);
	rep(i,0,n)cin>>w[i]>>b[i];
	vector<ll> a(n);
	rep(i,0,n) a[i]=1LL*w[i]*(100-p)+1LL*b[i]*p;
	sort(ALL(a),greater<ll>());
	ll sum=0;
	rep(i,0,n)sum+=b[i];
	ll val=0;
	rep(i,0,n){
		val+=a[i];
		if(val>=1LL*p*sum){
			printf("%d\n",i+1);
			break;
		}
	}
	return 0;
}