import math, strscans var (_, x1, y1, x2, y2, x3, y3) = stdin.readAll.scanTuple"$f $f $f $f $f $f" proc d(a, b: float): float = sqrt a^2 + b^2 let d12 = d(x1 - x2, y1 - y2) d13 = d(x1 - x3, y1 - y3) d23 = d(x2 - x3, y2 - y3) list = [d12, d13, d23] maxD = max list if d13 == maxD: swap(x2, x3) swap(y2, y3) if d23 == maxD: swap(x1, x3) swap(y1, y3) if x1 > x2: swap(x1, x2) swap(y1, y2) let dx = (x2 - x1) dy = (y2 - y1) cx = x1 + dx / 2 cy = y1 + dy / 2 xa = cx - dy / 2 ya = cy + dx / 2 xb = cx + dy / 2 yb = cy - dx / 2 if x3 == xa and y3 == ya: echo xb.int," ",yb.int quit() if x3 == xb and y3 == yb: echo xa.int," ",ya.int quit() echo -1