// http://tenka1-2017.contest.atcoder.jp/submissions/1642761
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <iostream>
#include <map>
#include <memory.h>
#include <random>
#include <set>
#include <stdint.h>
#include <vector>
using namespace std;
 
typedef pair<pair<int, int>, int> line;
 
template <typename T>
pair<T, T> cross(const line& l1, const line& l2)
{
    const int a1 = l1.first.first;
    const int b1 = l1.first.second;
    const int c1 = l1.second;
 
    const int a2 = l2.first.first;
    const int b2 = l2.first.second;
    const int c2 = l2.second;
 
    const T x = (T)(c1 * b2 - c2 * b1) / (a1 * b2 - a2 * b1);
    const T y = (T)(c1 * a2 - c2 * a1) / (b1 * a2 - b2 * a1);
 
    return make_pair(x, y);
}
 
int main()
{
    cin.tie(0);
    int n;
    cin >> n;
 
    vector<line> vs(n);
    for (auto& p : vs) {
        cin >> p.first.first >> p.first.second >> p.second;
    }
 
    mt19937 rng(time(nullptr));
    uniform_int_distribution<int> dist(0, n - 1);
 
    vector<double> xs, ys;
    const int SAMPLES = 500000;
 
    for (int t = 0; t < SAMPLES; t++) {
    _rep:
        int i = dist(rng);
        int j = dist(rng);
        if (i == j)
            goto _rep;
 
        auto p = cross<double>(vs[i], vs[j]);
        xs.push_back(p.first);
        ys.push_back(p.second);
    }
 
    sort(xs.begin(), xs.end());
    sort(ys.begin(), ys.end());
 
    double d_lo_x = xs[SAMPLES / 2 - SAMPLES / 500];
    double d_hi_x = xs[SAMPLES / 2 + SAMPLES / 500];
    double d_lo_y = ys[SAMPLES / 2 - SAMPLES / 500];
    double d_hi_y = ys[SAMPLES / 2 + SAMPLES / 500];
 
    bool determ_x = (d_lo_x == d_hi_x);
    bool determ_y = (d_lo_y == d_hi_y);
 
    float lo_x = d_lo_x;
    float hi_x = d_hi_x;
    float lo_y = d_lo_y;
    float hi_y = d_hi_y;
 
    // if (n < 1000) {
    //     lo_x = xs.front();
    //     hi_x = xs.back();
    //     lo_y = ys.front();
    //     hi_y = ys.back();
    // }
    // cerr << lo_x << ", " << hi_x << endl;
    // cerr << lo_y << ", " << hi_y << endl;
 
    int lo_cnt_x = 0;
    int lo_cnt_y = 0;
 
    vector<double> rxs, rys;
 
    static int fs[40000];
    for (int i = 0; i < n; i++) {
        line a = vs[i];
 
#pragma clang loop vectorize(enable)
        for (int j = i + 1; j < n; j++) {
            const auto p = cross<float>(a, vs[j]);
 
            if (p.first < lo_x)
                lo_cnt_x++;
            if (p.second < lo_y)
                lo_cnt_y++;
 
            fs[j] = (lo_x <= p.first && p.first <= hi_x ? 1 : 0) | (lo_y <= p.second && p.second <= hi_y ? 2 : 0);
        }
 
        if (!determ_x) {
            for (int j = i + 1; j < n; j++) {
                if (fs[j] & 1) {
                    rxs.push_back(cross<double>(vs[i], vs[j]).first);
                }
            }
        }
        if (!determ_y) {
            for (int j = i + 1; j < n; j++) {
                if (fs[j] & 2) {
                    rys.push_back(cross<double>(vs[i], vs[j]).second);
                }
            }
        }
    }
 
    int nn = (n * (n - 1) / 2 + 1) / 2;
    // cerr << lo_cnt_x << " + " << rxs.size() << " = " << lo_cnt_x + rxs.size() << " ~ " << nn << endl;
    // cerr << lo_cnt_y << " + " << rys.size() << " = " << lo_cnt_y + rys.size() << " ~ " << nn << endl;
 
    if (!determ_x && !(lo_cnt_x < nn && lo_cnt_x + rxs.size() >= nn))
        return 0;
    if (!determ_y && !(lo_cnt_y < nn && lo_cnt_y + rys.size() >= nn))
        return 0;
 
    if (!determ_x)
        nth_element(rxs.begin(), rxs.begin() + (nn - 1 - lo_cnt_x), rxs.end());
    if (!determ_y)
        nth_element(rys.begin(), rys.begin() + (nn - 1 - lo_cnt_y), rys.end());
 
    // printf("%.12f %.12f\n", rxs[nn - 1 - lo_cnt_x], rys[nn - 1 - lo_cnt_y]);
    printf("%.12f %.12f\n",
        determ_x ? d_lo_x : rxs[nn - 1 - lo_cnt_x],
        determ_y ? d_lo_y : rys[nn - 1 - lo_cnt_y]);
 
    return 0;
}


Measured memory_bytes: 68936