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<cassert>
#include<cmath>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)

struct st{
  double v,w;
  bool operator<(const st & a)const{
    return v/w < a.v/a.w;
  }
  bool operator>(const st & a)const{
    return v/w > a.v/a.w;
  }
};

double solve(double w,vector<st> & pos,vector<st> & neg){
  double posx=0;/*ppが指しているものweight*/
  double negx=1;
  double ret = 0;
  int pp = 0,np = 0;
  while(pp < pos.size() && w > 0){
    double tx = min(1.0,w/pos[pp].w);
    ret += pos[pp].v * tx;
    w -= tx * pos[pp].w;
    if (w < 1e-10){
      posx = 1-tx;
      break;
    }
    else pp++;
  }
  if (posx < 1e-10)pp++,posx = 1;
  //cout << "pp : " << ret <<" "<< posx << endl;

  while(pp < pos.size() && np < neg.size()){
    /*posxを詰め込むために必要なw。*/
    double pw = posx * pos[pp].w;
    /*negxによって、開けることができるw。*/
    double gw = negx * -neg[np].w;
    double used = min(pw,gw);
    double px = used/pos[pp].w;
    double gx = used/-neg[np].w;
    if (px * pos[pp].v < gx * -neg[np].v)break;/*これ以上は、負/負のものを使っても価値が増えることはない。*/
    ret += px * pos[pp].v;
    ret += gx * neg[np].v;

    posx -= px;
    negx -= gx;

    if (posx < 1e-10)pp++,posx = 1;
    if (negx < 1e-10)np++,negx = 1;
  }
  return ret;
}

int main(){
  int n,w;
  while(cin>>n>>w && n){
    double ans=0,wlim = w;
    vector<st> pos,neg;
    rep(i,n){
      double tw,tv;
      cin>>tw>>tv;
      if (tw <= 0 && tv >= 0){//全部使って良い
	w -= tw;
	ans += tv;
      }else if (0 < tw && tv <= 0){//一つも使わない。
      }else if (tw >= 0 && tv > 0){//
	pos.push_back((st){tv,tw});
      }else if (tw < 0 && tv <= 0){
	neg.push_back((st){tv,tw});
      }
    }
    sort(pos.begin(),pos.end(),greater<st>());
    sort(neg.begin(),neg.end());
    //rep(i,pos.size())cout << pos[i].w <<" " << pos[i].v << endl;
    double tmp = solve(w,pos,neg);
    printf("%.10lf\n",tmp+ans);
  }
}