import numpy as np import scipy 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 # print(x, y) 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) ans = scipy.optimize.fmin(f, [-100000, 100000], disp=False, maxiter=500, ftol=1e-9) print(*ans)