Problem: There are N lines in the xy-plane. The i-th line is represented by A_ix+B_iy=C_i. Any two lines among the N+2 lines, the above N lines plus the x-axis and y-axis, cross each other at exactly one point.

For each pair 1 \leq i < j \leq N, there is a car at the cross point of the i-th and j-th lines. Even where three or more lines intersect at a point, a car is individually placed for each pair of lines. That is, there will be k(k-1)/2 cars placed at the intersection of k lines.

Those cars are already very old, and can only be moved parallel to the x-axis or y-axis.

Takahashi will hold an exhibition of antique cars at a place on the xy-plane. In order to avoid damaging the half-broken cars too much, he will select the place of the exhibition so that the total distance covered will be minimized when all the cars are moved to the place. If such a place is not uniquely determined, among the places that satisfy the condition above, the place with the minimum x-coordinate will be selected. If the place is still not uniquely determined, among the places that satisfy the two conditions above, the place with the minimum y-coordinate will be selected.

Find the place of the exhibition that will be selected.

Constraints

* 2 \leq N \leq 4 × 10^4
* 1 \leq |A_i|,|B_i| \leq 10^4(1 \leq i \leq N)
* 0 \leq |C_i| \leq 10^4(1 \leq i \leq N)
* No two given lines are parallel.
* All input values are integers.

Inputs

Input is given from Standard Input in the following format:


N
A_1 B_1 C_1
:
A_N B_N C_N


Outputs

Print the x-coordinate and y-coordinate of the place of the exhibition that will be selected, in this order, with a space in between. The output will be judged as correct when the absolute or relative error is at most 10^{-9}.

Examples

Input

3
1 1 1
2 -1 2
-1 2 2


Output

1.000000000000000 1.000000000000000


Input

4
1 1 2
1 -1 0
3 -1 -2
1 -3 4


Output

-1.000000000000000 -1.000000000000000


Input

7
1 7 8
-2 4 9
3 -8 -5
9 2 -14
6 7 5
-8 -9 3
3 8 10


Output

-1.722222222222222 1.325000000000000

Solution (in CPP):

Solution:
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <queue>
#include <string>
#include <set>
#include <map>
#define REP(i,n) for(ll i = 0; i < (ll)n; i++)
#define INF 100000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;

struct line{double a,b,c; double grad;};

bool comp_grad(line l, line r){
  return l.grad>r.grad;
}

struct inv_num{
  vector<ll>bit;
  ll n;
  void init(ll _n){
    n = _n;
    bit.resize(2*n);
  }
  ll sum(ll i){
    ll s = 0;
    while(i>0){
      s+=bit[i];
      i-=i&-i;
    }
    return s;
  }
  void add(ll i, ll x){
    while(i<=n){
      bit[i]+=x;
      i+=i&-i;
    }
  }
  ll ans(ll* list, ll n){
    init(n);
    ll res = 0;
    REP(j,n){
      res+=j-sum(list[j]);
      add(list[j],1);
    }
    return res;
  }
};


int main(){
  ll n; cin >> n;
  line lines[n];
  REP(i,n){
    cin >> lines[i].a >> lines[i].b >> lines[i].c;
    lines[i].grad = -lines[i].a/lines[i].b;
  }
  sort(lines,lines+n,comp_grad);
  double lb = -INF, ub = INF, mid;
  REP(_,100){
    mid = (lb+ub)/2;
    pair<double,int> y[n];
    REP(i,n) y[i].first=(lines[i].c-lines[i].a*mid)/lines[i].b, y[i].second = i+1;
    //printf("%e %e %e\n",y[0].first, y[1].first, y[2].first);
    sort(y,y+n);
    ll a[n];
    REP(i,n) a[i]=y[i].second;
    inv_num inv;
    ll rev_num = inv.ans(a,n);
    if(rev_num<ceil(n*(n-1)/4.0)){
      lb = mid;
    }else{
      ub = mid;
    }
  }
  double ans_x = mid;

  REP(i,n) lines[i].grad = -lines[i].b/lines[i].a;
  sort(lines,lines+n,comp_grad);
  lb = -INF, ub = INF;
  REP(_,100){
    mid = (lb+ub)/2;
    pair<double,int> x[n];
    REP(i,n) x[i].first=(lines[i].c-lines[i].b*mid)/lines[i].a, x[i].second = i+1;
    //printf("%e %e %e\n",y[0].first, y[1].first, y[2].first);
    sort(x,x+n);
    ll a[n];
    REP(i,n) a[i]=x[i].second;
    inv_num inv;
    ll rev_num = inv.ans(a,n);
    if(rev_num<ceil(n*(n-1)/4.0)){
      lb = mid;
    }else{
      ub = mid;
    }
  }
  printf("%.10f %.10f\n",ans_x,mid);
  return 0;
}