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;

const int N = 1e5 + 5, ITER = 100;
const double inf = 1e9;

int n;
struct line {
  long long a, b, c;
  line() {}
  double getx(double y) {
    return -(double)(b * y + c)/(double)a; 
  }
  double gety(double x) {
    return -(double)(a * x + c)/(double)b; 
  }
};
line l[N];
int pos[N], id[N];

bool cmp(int le, int ri) {
  return l[le].a * l[ri].b > l[le].b * l[ri].a;
}

pair<double, int> vs[N];

int bit[N];

int get(int x) {
  int ret = 0;
  for (; x; x -= x&-x)
    ret += bit[x];
  return ret;
}
void upd(int x, int v) {
  for (; x <= n; x += x&-x)
    bit[x] += v;
}

double solve() {
  sort(id, id + n, cmp);
  for (int i = 0; i < n; i++)
    pos[id[i]] = i;
  double le = -inf, ri = inf;
  long long all = 1LL * n * (n - 1) / 2;
  for (int iter = 0; iter < ITER; iter++) {
    double mid = (le + ri) / 2.0;
    for (int i = 0; i < n; i++) {
      vs[i] = make_pair(l[i].gety(mid), i);
    }
    sort(vs, vs+n);
    fill(bit, bit+n+1, 0);
    long long cnt = 0;
    // for (int i = 0; i < n; i++)
    //   cerr << id[i] << " ";
    // cerr << " ? " << endl;
    for (int i = 0; i < n; i++) {
      // cerr << vs[i].second << " ";
      cnt += get(pos[vs[i].second] + 1);
      upd(pos[vs[i].second] + 1, 1);
    }
    // cerr << " " << cnt << endl;
    if (cnt * 2 >= all)
      ri = mid;
    else
      le = mid;
  }
  return le;
}

int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lld %lld %lld", &l[i].a, &l[i].b, &l[i].c);
    l[i].c *= -1;
    if (l[i].b < 0) {
      l[i].a *= -1;
      l[i].b *= -1;
      l[i].c *= -1;
    }
    id[i] = i;
  }
  double x = solve();
  for (int i = 0; i < n; i++) { 
    swap(l[i].a, l[i].b);
    if (l[i].b < 0) {
      l[i].a *= -1;
      l[i].b *= -1;
      l[i].c *= -1;
    }
    id[i] = i;
  }
  double y = solve();
  printf("%.20lf %.20lf\n", x, y);
  return 0;
}