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 JAVA):

Solution:
import java.util.Arrays;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Scanner;
 
 
public class Main{
	
	public static class Pair implements Comparable<Pair>{
		int w, v;
		
		public Pair(int w, int v) {
			super();
			this.w = w;
			this.v = v;
		}

		@Override
		public int compareTo(Pair o) {
			return this.w * o.v - this.v * o.w;
		}
	}
	
    public static void main(String[] args){
    	final Scanner sc = new Scanner(System.in);
    	
    	final int N = sc.nextInt();
    	final int W = sc.nextInt();
    	
    	PriorityQueue<Pair> queue = new PriorityQueue<Main.Pair>(); 
    	
    	double cur_w = 0, cur_v = 0;
    	
    	for(int i = 0; i < N; i++){
    		int w = sc.nextInt();
    		int v = sc.nextInt();
    		
    		if(w >= 0 && v <= 0){
    			continue;
    		}else if(w <= 0 && v >= 0){
    			cur_w += w;
    			cur_v += v;
    			continue;
    		}else if(w <= 0 && v <= 0){
    			cur_w += w;
    			cur_v += v;
    			
    			w = -w;
    			v = -v;
    		}
    		
    		queue.add(new Pair(w, v));
    	}
    	
    	
    	while(!queue.isEmpty()){
    		Pair p = queue.poll();
    		
    		final double rest = W - cur_w;
    		final double x = Math.max(0, Math.min(1, rest / p.w));
    		
    		//System.out.println(cur_w + " "+ rest + " "+ p.v + " " + p.w + " " + x);
    		
    		cur_w += x * p.w;
    		cur_v += x * p.v;
    	}
    	
    	System.out.printf("%f\n", cur_v);
    }
     
}