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 <iostream>
#include <stdio.h>
#include <stdlib.h>

using namespace std;
int comp(const void *a, const void *b)
{
	if (*((float*)a) < 0 && *((float*)b) > 0){
		return -1;
	} else if (*((float*)a) > 0 && *((float*)b) < 0){
		return 1;
	}
	float ans = *((float*)b + 1) / *((float*)b) - *((float*)a + 1) / *((float*)a);
	if (ans > 0){
		return 1;
	} else if (ans == 0){
		return 0;
	} else{
		return -1;
	}
}

int main(){
	int n, w, cnt;
	float a[100000][2];
	double ans = 0, sum = 0;

	cin >> n >> w;
	for (int i = 0; i < n; i++){
		int b, c;
		cin >> b >> c;
		if (b >= 0 && c <= 0){
			i--;
			n--;
			continue;
		} else if (b <= 0 && c <= 0){
			sum += b;
			ans += c;
			b *= -1;
			c *= -1;
		}
		a[i][0] = (float)b;
		a[i][1] = (float)c;
	}
	qsort(a, n, sizeof(float) * 2, comp);
	for (cnt = 0; cnt < n; cnt++){
		sum += a[cnt][0];
		if (sum > w){
			sum -= a[cnt][0];
			break;
		}
	}
	for (int i = 0; i < cnt; i++){
		ans += a[i][1];
	}
	if (cnt < n){
		if ((w - sum) / a[cnt][0] > 1){
			ans += a[cnt][1];
		} else{
			double tmp = (w - sum) * a[cnt][1];
			tmp /= a[cnt][0];
			ans += tmp;
		}
	}
	printf("%.4f\n", ans);
	return 0;
}