Problem: Problem statement

Real variables $ x_1, x_2, ..., x_N $ satisfy the following conditions.

1. $ 0 \ leq x_i \ leq 1 $ ($ 1 \ leq i \ leq N $)
2. $ w_1x_1 + w_2x_2 + ... + w_Nx_N \ leq W $



At this time, find the maximum value that $ v_1x_1 + v_2x_2 + ... + v_Nx_N $ can take. It is known that such a maximum actually exists.

Constraint

* $ 1 \ leq N \ leq 10 ^ 5 $
* $ 1 \ leq W \ leq 10 ^ 5 $
* $ -10 ^ 4 \ leq w_i \ leq 10 ^ 4 $
* $ -10 ^ 4 \ leq v_i \ leq 10 ^ 4 $



input

Input follows the following format. All given numbers are integers.


$ N $ $ W $
$ w_1 $ $ v_1 $
$ w_2 $ $ v_2 $
$ ... $
$ w_N $ $ v_N $

output

Output the maximum possible value of $ v_1x_1 + v_2x_2 + ... + v_Nx_N $ on one line. The output must not have an error greater than $ 10 ^ {-3} $.

Examples

Input

1 1
3 1


Output

0.333333


Input

2 3
3 3
1 2


Output

4.000000


Input

2 1
-1 -3
3 10


Output

3.666667

Solution (in CPP):

Solution:
#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#include<random>
#pragma warning(disable:4996)
using namespace std;
using ld= long double;

int main()
{
	int N;
	ld W;
	cin>>N>>W;
	vector<pair<ld,ld>>pluss;
	ld ans=0;
	for (int i = 0; i < N; ++i) {
		ld w,v;cin>>w>>v;
		if (w > 0) {
			if (v > 0) {
				pluss.emplace_back(w, v);
			}
			else if (v <= 0) {

			}
		}
		else {
			if (v >= 0) {
				ans += v;
				W -= w;
			}
			else {
				if (w < 0) {
					ans+=v;
					W-=w;
					pluss.emplace_back(-w,-v);
				}
			}
		}
	}
	sort(pluss.begin(), pluss.end(), [](const pair<ld, ld>&l, const pair<ld, ld>&r) {
		return l.second/l.first>r.second/r.first;
	});

	ld rest(W);
	int now(0);
	while (rest > 0&&now!=pluss.size()) {
		ld use=min(pluss[now].first,rest);
		ans+=use/pluss[now].first*pluss[now].second;
		rest-=use;
		now++;
	}
	cout<<setprecision(10)<<fixed<<ans<<endl;
	return 0;
}