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;
const int MAXN = 100010;
const double EPS = 1e-12;
const double LIM = 1e9;
const int LIM2 = 80;
int _w;

int dcmp( double x ) {
	return fabs(x) < EPS ? 0 : (x < 0 ? -1 : 1);
}

int n, k[MAXN];
double a[MAXN], b[MAXN], c[MAXN];
double p;
int tmp[MAXN];

namespace BIT {
	int c[MAXN];
	int lowbit( int x ) {
		return x & (-x);
	}
	void init() {
		memset(c, 0, sizeof c);
	}
	void add( int p ) {
		for( ; p <= n; p += lowbit(p) )
			++c[p];
	}
	int sum( int p ) {
		int s = 0;
		for( ; p; p -= lowbit(p) )
			s += c[p];
		return s;
	}
	int sum( int l, int r ) {
		return sum(r) - sum(l-1);
	}
}

bool cmpx( int i, int j ) {
	double yi = (c[i] - a[i] * p) / b[i];
	double yj = (c[j] - a[j] * p) / b[j];
	return dcmp(yi - yj) < 0;
}
void checkx( double x, ll &lcnt, ll &rcnt ) {
	for( int i = 0; i < n; ++i ) tmp[i] = i;
	p = x, sort(tmp, tmp+n, cmpx);
	lcnt = 0, rcnt = 0;
	BIT::init();
	for( int i = 0; i < n; ++i ) {
		lcnt += BIT::sum( 1, k[tmp[i]] );
		rcnt += BIT::sum( k[tmp[i]], n );
		BIT::add( k[tmp[i]] );
	}
}
double solvex() {
	ll half = (ll)n*(n-1)/2;
	half = (half>>1) + (half&1);
	double low = -LIM, high = LIM;
	for( int i = 0; i < LIM2; ++i ) {
		double mid = (low+high)/2;
		ll lcnt, rcnt;
		checkx(mid, lcnt, rcnt);
		if( lcnt >= half ) high = mid;
		else low = mid;
	}
	return low;
}

bool cmpy( int i, int j ) {
	double xi = (c[i] - b[i] * p) / a[i];
	double xj = (c[j] - b[j] * p) / a[j];
	return dcmp(xi - xj) < 0;
}
void checky( double y, ll &lcnt, ll &rcnt ) {
	for( int i = 0; i < n; ++i ) tmp[i] = i;
	p = y, sort(tmp, tmp+n, cmpy);
	lcnt = rcnt = 0;
	BIT::init();
	for( int i = 0; i < n; ++i ) {
		rcnt += BIT::sum( k[tmp[i]], n );
		lcnt += BIT::sum( 1, k[tmp[i]] );
		BIT::add( k[tmp[i]] );
	}
}
double solvey() {
	ll half = (ll)n*(n-1)/2;
	half = (half>>1) + (half&1);
	double low = -LIM, high = LIM;
	for( int i = 0; i < LIM2; ++i ) {
		double mid = (low+high)/2;
		ll lcnt, rcnt;
		checky(mid, lcnt, rcnt);
		if( lcnt >= half ) high = mid;
		else low = mid;
	}
	return low;
}

bool cmpkx( int i, int j ) {
	double ki = -a[i] / b[i];
	double kj = -a[j] / b[j];
	return dcmp(ki - kj) < 0;
}
bool cmpky( int i, int j ) {
	double ki = -b[i] / a[i];
	double kj = -b[j] / a[j];
	return dcmp(ki - kj) < 0;
}

int main() {
	_w = scanf( "%d", &n );
	for( int i = 0; i < n; ++i )
		_w = scanf( "%lf%lf%lf", a+i, b+i, c+i );
	for( int i = 0; i < n; ++i ) tmp[i] = i;
	sort(tmp, tmp+n, cmpkx);
	for( int i = 0; i < n; ++i ) k[tmp[i]] = i+1;
	double x = solvex();
	for( int i = 0; i < n; ++i ) tmp[i] = i;
	sort(tmp, tmp+n, cmpky);
	for( int i = 0; i < n; ++i ) k[tmp[i]] = i+1;
	double y = solvey();
	printf( "%.15lf %.15lf\n", x, y );
	return 0;
}