Buggy python submission (verdict: Time Limit Exceeded):
import sys
readline = sys.stdin.readline

class BIT:
    #1-indexed
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)
        self.p = 2**(n.bit_length() - 1)
        self.dep = n.bit_length()
    def get(self, i):
        s = 0
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s
 
    def add(self, i, x):
        while i <= self.size:
            self.tree[i] += x
            i += i & -i
    
    def bl(self, v):
        if v <= 0:
            return -1
        s = 0
        k = self.p
        for _ in range(self.dep):
            if s + k <= self.size and self.tree[s+k] < v:
                s += k
                v -= self.tree[s+k]
            k //= 2
        return s + 1
    
    def reset(self):
        self.tree = [0]*(self.size+1)

N = int(readline())
INF = 2e8 + 10
EPS = 1e-9

Points = [tuple(map(int, readline().split())) for _ in range(N)]
Points.sort(key = lambda x: -x[0]/x[1])
XA = [-a/b for a, b, _ in Points]
XB = [c/b for _, b, c in Points]
Points.sort(key = lambda x: -x[1]/x[0])
YA = [-b/a for a, b, _ in Points]
YB = [c/a for a, _, c in Points]
con = -(-N*(N-1)//4)
T = BIT(N)

ng = -INF
ok = INF

for _ in range(60):
    med = (ok+ng)/2
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: XA[x]*med + XB[x]):
        res += T.get(idx+1)
        T.add(idx+1, 1)
    if res >= con:
        ok = med
    else:
        ng = med

X = ok

ng = -INF
ok = INF

for _ in range(60):
    med = (ok+ng)/2
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: YA[x]*med + YB[x]):
        res += T.get(idx+1)
        T.add(idx+1, 1)
    if res >= con:
        ok = med
    else:
        ng = med

Y = ok

print(X, Y)


Fixed submission:
import sys
readline = sys.stdin.readline

class BIT:
    #1-indexed
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)
        self.p = 2**(n.bit_length() - 1)
        self.dep = n.bit_length()
    def get(self, i):
        s = 0
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s
 
    def add(self, i, x):
        while i <= self.size:
            self.tree[i] += x
            i += i & -i
    
    def bl(self, v):
        if v <= 0:
            return -1
        s = 0
        k = self.p
        for _ in range(self.dep):
            if s + k <= self.size and self.tree[s+k] < v:
                s += k
                v -= self.tree[s+k]
            k //= 2
        return s + 1
    
    def reset(self):
        self.tree = [0]*(self.size+1)

N = int(readline())
INF = 2e8 + 10
EPS = 1e-9

Points = [tuple(map(int, readline().split())) for _ in range(N)]
Points.sort(key = lambda x: -x[0]/x[1])
XA = [-a/b for a, b, _ in Points]
XB = [c/b for _, b, c in Points]
Points.sort(key = lambda x: -x[1]/x[0])
YA = [-b/a for a, b, _ in Points]
YB = [c/a for a, _, c in Points]
con = -(-N*(N-1)//4)
T = BIT(N)

ng = -INF
ok = INF
nf = con
of = con


while abs(ok-ng)/max(1, min(abs(ok), abs(ng))) > EPS:
    med = (ok*nf+ng*of)/(of+nf)
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: XA[x]*med + XB[x]):
        res += T.get(idx+1)
        T.add(idx+1, 1)
    if res >= con:
        ok = med
        of = ((res - con)*2 + 1) ** 0.3
    else:
        ng = med
        nf = ((con - res)*2) ** 0.3

X = ok

ng = -INF
ok = INF
nf = con
of = con

cnt = 1
while abs(ok-ng)/max(1, min(abs(ok), abs(ng))) > EPS:
    cnt += 1
    med = (ok*nf+ng*of)/(of+nf)
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: YA[x]*med + YB[x]):
        res += T.get(idx+1)
        T.add(idx+1, 1)
    if res >= con:
        ok = med
        of = ((res - con)*2 + 1) ** 0.3
    else:
        ng = med
        nf = ((con - res)*2) ** 0.3

Y = ok

print(X, Y)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
readline = sys.stdin.readline

class BIT:
    #1-indexed
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)
        self.p = 2**(n.bit_length() - 1)
        self.dep = n.bit_length()
    def get(self, i):
        s = 0
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s
 
    def add(self, i, x):
        while i <= self.size:
            self.tree[i] += x
            i += i & -i
    
    def bl(self, v):
        if v <= 0:
            return -1
        s = 0
        k = self.p
        for _ in range(self.dep):
            if s + k <= self.size and self.tree[s+k] < v:
                s += k
                v -= self.tree[s+k]
            k //= 2
        return s + 1
    
    def reset(self):
        self.tree = [0]*(self.size+1)

N = int(readline())
INF = 2e8 + 10
EPS = 1e-9

Points = [tuple(map(int, readline().split())) for _ in range(N)]
XA = [-a/b for a, b, _ in Points]
XB = [c/b for _, b, c in Points]
YA = [-b/a for a, b, _ in Points]
YB = [c/a for a, _, c in Points]
con = -(-N*(N-1)//4)
T = BIT(N)

ds = sorted(range(N), key = lambda x: XA[x])
rd = [None]*N
for i in range(N):
    rd[ds[i]] = i

ng = -INF
ok = INF

for _ in range(60):
    med = (ok+ng)/2
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: XA[x]*med + XB[x]):
        res += T.get(rd[idx]+1)
        T.add(rd[idx]+1, 1)
    if res >= con:
        ok = med
    else:
        ng = med

X = ok

ds = sorted(range(N), key = lambda x: YA[x])

rd = [None]*N
for i in range(N):
    rd[ds[i]] = i

ng = -INF
ok = INF

for _ in range(60):
    med = (ok+ng)/2
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: YA[x]*med + YB[x]):
        res += T.get(rd[idx]+1)
        T.add(rd[idx]+1, 1)
    if res >= con:
        ok = med
    else:
        ng = med

Y = ok

print(X, Y)


Fixed submission:
import sys
readline = sys.stdin.readline

class BIT:
    #1-indexed
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)
        self.p = 2**(n.bit_length() - 1)
        self.dep = n.bit_length()
    def get(self, i):
        s = 0
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s
 
    def add(self, i, x):
        while i <= self.size:
            self.tree[i] += x
            i += i & -i
    
    def bl(self, v):
        if v <= 0:
            return -1
        s = 0
        k = self.p
        for _ in range(self.dep):
            if s + k <= self.size and self.tree[s+k] < v:
                s += k
                v -= self.tree[s+k]
            k //= 2
        return s + 1
    
    def reset(self):
        self.tree = [0]*(self.size+1)

N = int(readline())
INF = 2e8 + 10
EPS = 1e-9

Points = [tuple(map(int, readline().split())) for _ in range(N)]
Points.sort(key = lambda x: -x[0]/x[1])
XA = [-a/b for a, b, _ in Points]
XB = [c/b for _, b, c in Points]
Points.sort(key = lambda x: -x[1]/x[0])
YA = [-b/a for a, b, _ in Points]
YB = [c/a for a, _, c in Points]
con = -(-N*(N-1)//4)
T = BIT(N)

ng = -INF
ok = INF
nf = con
of = con


while abs(ok-ng)/max(1, min(abs(ok), abs(ng))) > EPS:
    med = (ok*nf+ng*of)/(of+nf)
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: XA[x]*med + XB[x]):
        res += T.get(idx+1)
        T.add(idx+1, 1)
    if res >= con:
        ok = med
        of = ((res - con)*2 + 1) ** 0.3
    else:
        ng = med
        nf = ((con - res)*2) ** 0.3

X = ok

ng = -INF
ok = INF
nf = con
of = con

cnt = 1
while abs(ok-ng)/max(1, min(abs(ok), abs(ng))) > EPS:
    cnt += 1
    med = (ok*nf+ng*of)/(of+nf)
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: YA[x]*med + YB[x]):
        res += T.get(idx+1)
        T.add(idx+1, 1)
    if res >= con:
        ok = med
        of = ((res - con)*2 + 1) ** 0.3
    else:
        ng = med
        nf = ((con - res)*2) ** 0.3

Y = ok

print(X, Y)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
readline = sys.stdin.readline

class BIT:
    #1-indexed
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)
        self.p = 2**(n.bit_length() - 1)
        self.dep = n.bit_length()
    def get(self, i):
        s = 0
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s
 
    def add(self, i, x):
        while i <= self.size:
            self.tree[i] += x
            i += i & -i
    
    def bl(self, v):
        if v <= 0:
            return -1
        s = 0
        k = self.p
        for _ in range(self.dep):
            if s + k <= self.size and self.tree[s+k] < v:
                s += k
                v -= self.tree[s+k]
            k //= 2
        return s + 1
    
    def reset(self):
        self.tree = [0]*(self.size+1)

N = int(readline())
INF = 1e9
EPS = 1e-9

Points = [tuple(map(int, readline().split())) for _ in range(N)]
XA = [-a/b for a, b, _ in Points]
XB = [c/b for _, b, c in Points]
YA = [-b/a for a, b, _ in Points]
YB = [c/a for a, _, c in Points]
con = -(-N*(N-1)//4)
T = BIT(N)

ds = sorted(range(N), key = lambda x: XA[x])
rd = [None]*N
for i in range(N):
    rd[ds[i]] = i

ng = -INF
ok = INF

while abs(ok-ng)/max(1, min(abs(ok), abs(ng))) > EPS:
    med = (ok+ng)/2
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: XA[x]*med + XB[x]):
        res += T.get(rd[idx]+1)
        T.add(rd[idx]+1, 1)
    if res >= con:
        ok = med
    else:
        ng = med

X = ok

ds = sorted(range(N), key = lambda x: YA[x])

rd = [None]*N
for i in range(N):
    rd[ds[i]] = i

ng = -INF
ok = INF

while abs(ok-ng)/max(1, min(abs(ok), abs(ng))) > EPS:
    med = (ok+ng)/2
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: YA[x]*med + YB[x]):
        res += T.get(rd[idx]+1)
        T.add(rd[idx]+1, 1)
    if res >= con:
        ok = med
    else:
        ng = med

Y = ok

print(X, Y)


Fixed submission:
import sys
readline = sys.stdin.readline

class BIT:
    #1-indexed
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)
        self.p = 2**(n.bit_length() - 1)
        self.dep = n.bit_length()
    def get(self, i):
        s = 0
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s
 
    def add(self, i, x):
        while i <= self.size:
            self.tree[i] += x
            i += i & -i
    
    def bl(self, v):
        if v <= 0:
            return -1
        s = 0
        k = self.p
        for _ in range(self.dep):
            if s + k <= self.size and self.tree[s+k] < v:
                s += k
                v -= self.tree[s+k]
            k //= 2
        return s + 1
    
    def reset(self):
        self.tree = [0]*(self.size+1)

N = int(readline())
INF = 2e8 + 10
EPS = 1e-9

Points = [tuple(map(int, readline().split())) for _ in range(N)]
Points.sort(key = lambda x: -x[0]/x[1])
XA = [-a/b for a, b, _ in Points]
XB = [c/b for _, b, c in Points]
Points.sort(key = lambda x: -x[1]/x[0])
YA = [-b/a for a, b, _ in Points]
YB = [c/a for a, _, c in Points]
con = -(-N*(N-1)//4)
T = BIT(N)

ng = -INF
ok = INF
nf = con
of = con


while abs(ok-ng)/max(1, min(abs(ok), abs(ng))) > EPS:
    med = (ok*nf+ng*of)/(of+nf)
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: XA[x]*med + XB[x]):
        res += T.get(idx+1)
        T.add(idx+1, 1)
    if res >= con:
        ok = med
        of = ((res - con)*2 + 1) ** 0.3
    else:
        ng = med
        nf = ((con - res)*2) ** 0.3

X = ok

ng = -INF
ok = INF
nf = con
of = con

cnt = 1
while abs(ok-ng)/max(1, min(abs(ok), abs(ng))) > EPS:
    cnt += 1
    med = (ok*nf+ng*of)/(of+nf)
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: YA[x]*med + YB[x]):
        res += T.get(idx+1)
        T.add(idx+1, 1)
    if res >= con:
        ok = med
        of = ((res - con)*2 + 1) ** 0.3
    else:
        ng = med
        nf = ((con - res)*2) ** 0.3

Y = ok

print(X, Y)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
readline = sys.stdin.readline

class BIT:
    #1-indexed
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)
        self.p = 2**(n.bit_length() - 1)
        self.dep = n.bit_length()
    def get(self, i):
        s = 0
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s
 
    def add(self, i, x):
        while i <= self.size:
            self.tree[i] += x
            i += i & -i
    
    def bl(self, v):
        if v <= 0:
            return -1
        s = 0
        k = self.p
        for _ in range(self.dep):
            if s + k <= self.size and self.tree[s+k] < v:
                s += k
                v -= self.tree[s+k]
            k //= 2
        return s + 1

N = int(readline())
INF = 1e9
EPS = 1e-9

Points = [tuple(map(int, readline().split())) for _ in range(N)]
XA = [-a/b for a, b, _ in Points]
XB = [c/b for _, b, c in Points]
YA = [-b/a for a, b, _ in Points]
YB = [c/a for a, _, c in Points]
ds = sorted(range(N), key = lambda x: XA[x])

rd = [None]*N
for i in range(N):
    rd[ds[i]] = i

ng = -INF
ok = INF

con = -(-N*(N-1)//4)
while abs(ok-ng) > EPS:
    med = (ok+ng)/2
    T = BIT(N)
    res = 0
    for idx in sorted(range(N), key = lambda x: XA[x]*med + XB[x]):
        res += T.get(rd[idx]+1)
        T.add(rd[idx]+1, 1)
    if res >= con:
        ok = med
    else:
        ng = med

X = ok

ds = sorted(range(N), key = lambda x: YA[x])

rd = [None]*N
for i in range(N):
    rd[ds[i]] = i

ng = -INF
ok = INF

while abs(ok-ng) > EPS:
    med = (ok+ng)/2
    T = BIT(N)
    res = 0
    for idx in sorted(range(N), key = lambda x: YA[x]*med + YB[x]):
        res += T.get(rd[idx]+1)
        T.add(rd[idx]+1, 1)
    if res >= con:
        ok = med
    else:
        ng = med

Y = ok

print(X, Y)


Fixed submission:
import sys
readline = sys.stdin.readline

class BIT:
    #1-indexed
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)
        self.p = 2**(n.bit_length() - 1)
        self.dep = n.bit_length()
    def get(self, i):
        s = 0
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s
 
    def add(self, i, x):
        while i <= self.size:
            self.tree[i] += x
            i += i & -i
    
    def bl(self, v):
        if v <= 0:
            return -1
        s = 0
        k = self.p
        for _ in range(self.dep):
            if s + k <= self.size and self.tree[s+k] < v:
                s += k
                v -= self.tree[s+k]
            k //= 2
        return s + 1
    
    def reset(self):
        self.tree = [0]*(self.size+1)

N = int(readline())
INF = 2e8 + 10
EPS = 1e-9

Points = [tuple(map(int, readline().split())) for _ in range(N)]
Points.sort(key = lambda x: -x[0]/x[1])
XA = [-a/b for a, b, _ in Points]
XB = [c/b for _, b, c in Points]
Points.sort(key = lambda x: -x[1]/x[0])
YA = [-b/a for a, b, _ in Points]
YB = [c/a for a, _, c in Points]
con = -(-N*(N-1)//4)
T = BIT(N)

ng = -INF
ok = INF
nf = con
of = con


while abs(ok-ng)/max(1, min(abs(ok), abs(ng))) > EPS:
    med = (ok*nf+ng*of)/(of+nf)
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: XA[x]*med + XB[x]):
        res += T.get(idx+1)
        T.add(idx+1, 1)
    if res >= con:
        ok = med
        of = ((res - con)*2 + 1) ** 0.3
    else:
        ng = med
        nf = ((con - res)*2) ** 0.3

X = ok

ng = -INF
ok = INF
nf = con
of = con

cnt = 1
while abs(ok-ng)/max(1, min(abs(ok), abs(ng))) > EPS:
    cnt += 1
    med = (ok*nf+ng*of)/(of+nf)
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: YA[x]*med + YB[x]):
        res += T.get(idx+1)
        T.add(idx+1, 1)
    if res >= con:
        ok = med
        of = ((res - con)*2 + 1) ** 0.3
    else:
        ng = med
        nf = ((con - res)*2) ** 0.3

Y = ok

print(X, Y)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
readline = sys.stdin.readline

class BIT:
    #1-indexed
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)
        self.p = 2**(n.bit_length() - 1)
        self.dep = n.bit_length()
    def get(self, i):
        s = 0
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s
 
    def add(self, i, x):
        while i <= self.size:
            self.tree[i] += x
            i += i & -i
    
    def bl(self, v):
        if v <= 0:
            return -1
        s = 0
        k = self.p
        for _ in range(self.dep):
            if s + k <= self.size and self.tree[s+k] < v:
                s += k
                v -= self.tree[s+k]
            k //= 2
        return s + 1

N = int(readline())

Points = [tuple(map(int, readline().split())) for _ in range(N)]

ds = sorted(range(N), key = lambda x: -Points[x][0]/Points[x][1])

rd = [None]*N
for i in range(N):
    rd[ds[i]] = i

ng = -10**18
ok = 10**18

con = -(-N*(N-1)//4)
for _ in range(100):
    med = (ok+ng)/2
    T = BIT(N)
    res = 0
    for idx in sorted(range(N), key = lambda x: -Points[x][0]/Points[x][1]*med + Points[x][2]/Points[x][1]):
        res += T.get(rd[idx]+1)
        T.add(rd[idx]+1, 1)
    if res >= con:
        ok = med
    else:
        ng = med

X = ok

ds = sorted(range(N), key = lambda x: -Points[x][1]/Points[x][0])

rd = [None]*N
for i in range(N):
    rd[ds[i]] = i

ng = -10**18
ok = 10**18

for _ in range(100):
    med = (ok+ng)/2
    T = BIT(N)
    res = 0
    for idx in sorted(range(N), key = lambda x: -Points[x][1]/Points[x][0]*med + Points[x][2]/Points[x][0]):
        res += T.get(rd[idx]+1)
        T.add(rd[idx]+1, 1)
    if res >= con:
        ok = med
    else:
        ng = med

Y = ok

print(X, Y)

Fixed submission:
import sys
readline = sys.stdin.readline

class BIT:
    #1-indexed
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)
        self.p = 2**(n.bit_length() - 1)
        self.dep = n.bit_length()
    def get(self, i):
        s = 0
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s
 
    def add(self, i, x):
        while i <= self.size:
            self.tree[i] += x
            i += i & -i
    
    def bl(self, v):
        if v <= 0:
            return -1
        s = 0
        k = self.p
        for _ in range(self.dep):
            if s + k <= self.size and self.tree[s+k] < v:
                s += k
                v -= self.tree[s+k]
            k //= 2
        return s + 1
    
    def reset(self):
        self.tree = [0]*(self.size+1)

N = int(readline())
INF = 2e8 + 10
EPS = 1e-9

Points = [tuple(map(int, readline().split())) for _ in range(N)]
Points.sort(key = lambda x: -x[0]/x[1])
XA = [-a/b for a, b, _ in Points]
XB = [c/b for _, b, c in Points]
Points.sort(key = lambda x: -x[1]/x[0])
YA = [-b/a for a, b, _ in Points]
YB = [c/a for a, _, c in Points]
con = -(-N*(N-1)//4)
T = BIT(N)

ng = -INF
ok = INF
nf = con
of = con


while abs(ok-ng)/max(1, min(abs(ok), abs(ng))) > EPS:
    med = (ok*nf+ng*of)/(of+nf)
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: XA[x]*med + XB[x]):
        res += T.get(idx+1)
        T.add(idx+1, 1)
    if res >= con:
        ok = med
        of = ((res - con)*2 + 1) ** 0.3
    else:
        ng = med
        nf = ((con - res)*2) ** 0.3

X = ok

ng = -INF
ok = INF
nf = con
of = con

cnt = 1
while abs(ok-ng)/max(1, min(abs(ok), abs(ng))) > EPS:
    cnt += 1
    med = (ok*nf+ng*of)/(of+nf)
    T.reset()
    res = 0
    for idx in sorted(range(N), key = lambda x: YA[x]*med + YB[x]):
        res += T.get(idx+1)
        T.add(idx+1, 1)
    if res >= con:
        ok = med
        of = ((res - con)*2 + 1) ** 0.3
    else:
        ng = med
        nf = ((con - res)*2) ** 0.3

Y = ok

print(X, Y)