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;

#define sqr(x) ((x) * (x))
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define fin(name) freopen(name, "r", stdin)
#define fout(name) freopen(name, "w", stdout)
#define I(x, a) for(auto x : a)
#define F(i, l, r) for(auto i = l; i != r; ++i)
#define DF(i, l, r) for(auto i = l; i != r; --i)
#define clean(a) memset((a),0,sizeof (a))
#define sync ios_base::sync_with_stdio(0);cin.tie(0)
#define all(x) x.begin(),x.end()
#define ret return
#define cont continue
#define brk break
#define ins insert

typedef long long ll;
typedef unsigned long long ull;
typedef long double dbl;
typedef pair <int, int> pii;

const int inf = (int)1e9;
const ll linf = (ll)1e18;
const int mod = (int) 1e9 + 7;
const dbl eps = (dbl) 1e-8;
const int maxn = (int) 1e5 + 5;
const dbl pi = acos(-1);

int t[4 * maxn];

int sum(int v, int l, int r, int tl, int tr)
{
	if (l > r || tl > tr)
		ret 0;
	if (l == tl && r == tr)
		ret t[v];
	int m = (l + r) / 2;
	ret sum(2 * v, l, m, tl, min(tr, m)) + sum(2 * v + 1, m + 1, r, max(tl, m + 1), tr);
}

void upd(int v, int l, int r, int pos)
{
	if (pos < l || pos > r)
		ret;
	if (l == r)
	{
		t[v] = 1;
		ret;
	}
	int m = (l + r) / 2;
	upd(2 * v, l, m, pos);
	upd(2 * v + 1, m + 1, r, pos);
	t[v] = t[2 * v] + t[2 * v + 1];
}

ll A[maxn], B[maxn], C[maxn], n;
int pos_in_z[maxn], pos_in_z_r[maxn];
dbl z[maxn], k[maxn], p[maxn];
pair <dbl, int> a[maxn], b[maxn];

ll cnt(dbl x)
{
	ll ans = 0;	
	F(i, 0, n)
	{
		z[i] = p[i] + x * k[i];
		a[i] = mp(z[i], i);
	}
	sort(a, a + n);
	int r = -1;
	F(i, 0, n)
	{
		pos_in_z[a[i].Y] = i;
		if (i == n - 1 || a[i + 1].X > a[i].X)
			r = i;
		pos_in_z_r[a[i].Y] = r;
	}
	memset(t, 0, sizeof(int)*(4 * n + 5));
	F(i, 0, n)
	{
		dbl tz = z[b[i].Y];
		ll plus = sum(1, 0, n - 1, 0, pos_in_z_r[b[i].Y]);
//		cout << i << " " << plus << " " << tz << endl;
		ans += plus;
		upd(1, 0, n - 1, pos_in_z[b[i].Y]);
	}
	
	ret ans;
}

dbl solve()
{
	F(i, 0, n)
	{
		b[i] = mp(k[i], i);
	}
	sort(b, b + n);

	dbl l = -1e14, r = 1e14;
	ll n2 = (ll)n * (n - 1) / 2;
	if (n2 % 2 == 0)
		n2 = n2 / 2;
	else
		n2 = n2 / 2 + 1;
//	cout << cnt(-1) << endl;
//	exit(0);
	F(iter, 0, 90)
	{
		dbl m = (l + r) / (dbl)2;
		if (cnt(m) < n2)
			l = m;
		else
			r = m;
	}
	ret r;
}

int main()
{
//    fin("t.in");
    sync;
    cin >> n;
    F(i, 0, n)
    {
    	cin >> A[i] >> B[i] >> C[i];
//    	A[i] = rand() + 1;
//    	B[i] = rand() + 1;
//    	C[i] = rand();
    	C[i] = -C[i];
    }
 	F(i, 0, n)
 	{
 		k[i] = -(dbl)A[i] / B[i];
 		p[i] = -(dbl)C[i] / B[i];
 	}
 	cout << fixed << setprecision(20);
 	cout << solve() << " ";
 	F(i, 0, n)
 	{
 		k[i] = -(dbl)B[i] / A[i];
 		p[i] = -(dbl)C[i] / A[i];
 	}
 	cout << solve() << endl;
    return 0;
}