import numpy as np import scipy import time import random p = float(input()) ax, ay = map(float, input().split()) bx, by = map(float, input().split()) cx, cy = map(float, input().split()) def my_pow(x): return np.abs(x) ** p def f(point): x, y = point anorm = my_pow(ax - x) + my_pow(ay - y) bnorm = my_pow(bx - x) + my_pow(by - y) cnorm = my_pow(cx - x) + my_pow(cy - y) return max(anorm, bnorm, cnorm) - min(anorm, bnorm, cnorm) start = time.time() ans = [] best = 1e9 for X in [-(10**6), 10**6]: for Y in [-(10**6), 10**6]: cur = scipy.optimize.fmin(f, [X, Y], disp=False, maxiter=1000, ftol=1e-6) if f(cur) < best: ans = cur best = f(cur) while time.time() - start < 0.9: X = random.randint(-(10**6), 10**6) Y = random.randint(-(10**6), 10**6) cur = scipy.optimize.fmin(f, [X, Y], disp=False, maxiter=1000, ftol=1e-6) if f(cur) < best: ans = cur best = f(cur) print(*ans)