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 <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<double, ll> P;

#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define each(itr,v) for(auto itr:v)
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
#define exist(x,y) (find(all(x),y)!=x.end())
#define bcnt __builtin_popcount

#define INF INT_MAX/3
#define MAX_N 40010

struct BIT{
  ll bit[MAX_N+1];

  void init(){
    memset(bit,0,sizeof(bit));
  }

  ll sum(int i){
    ll s=0;
    while(i>0){
      s+=bit[i];
      i-=i&-i;
    }
    return s;
  }

  void add(int i,ll v){
    while(i<=MAX_N){
      bit[i]+=v;
      i+=i&-i;
    }
  }
};

ll n,K;
double a[40100],b[40100],c[40100];

bool okx(double x){
  BIT bit;
  bit.init();
  vector<double> cs;
  vector<P> ids;
  rep(i,n){
    cs.push_back(c[i]/b[i]-x*(a[i]/b[i]));
    ids.push_back(P(a[i]/b[i],i));
  }
  sort(all(cs));
  sort(all(ids));
  ll cnt=0;
  rep(i,n){
    ll j=ids[i].se;
    ll idx=lower_bound(all(cs),c[j]/b[j]-x*(a[j]/b[j]))-cs.begin();
    cnt+=bit.sum(n)-bit.sum(idx);
    bit.add(idx+1,1);
  }
  return cnt>=K;
}

bool oky(double x){
  BIT bit;
  bit.init();
  vector<double> cs;
  vector<P> ids;
  rep(i,n){
    cs.push_back(c[i]/a[i]-x*(b[i]/a[i]));
    ids.push_back(P(b[i]/a[i],i));
  }
  sort(all(cs));
  sort(all(ids));
  ll cnt=0;
  rep(i,n){
    ll j=ids[i].se;
    ll idx=lower_bound(all(cs),c[j]/a[j]-x*(b[j]/a[j]))-cs.begin();
    cnt+=bit.sum(n)-bit.sum(idx);
    bit.add(idx+1,1);
  }
  return cnt>=K;
}

int main(){
	cin>>n;
  K=n*(n-1)/2;
  if(K%2==0)K=(K/2)-1;
  else K/=2;
  K++;
  rep(i,n)cin>>a[i]>>b[i]>>c[i];
  
  /*if(n==2){
    double yy=((c[0]/a[0])-(c[1]/a[1]))/((b[0]/a[0])-(b[1]/a[1]));
    double xx=((c[0]/b[0])-(c[1]/b[1]))/((a[0]/b[0])-(a[1]/b[1]));
    printf("%.15f %.15f\n",xx,yy);
    return 0;
  }*/

  double resx,resy;

  {
    double lb=-1e18,ub=1e18;
    rep(hoge,100){
      double mid=(lb+ub)/2.0;
      if(okx(mid))ub=mid;
      else lb=mid;
    }
    resx=ub;
  }

  {
    double lb=-1e18,ub=1e18;
    rep(hoge,100){
      double mid=(lb+ub)/2.0;
      if(oky(mid))ub=mid;
      else lb=mid;
    }
    resy=ub;
  }

  printf("%.15f %.15f\n",resx,resy);
	return 0;
}