# -*- coding: utf-8 -*- """ No.55 正方形を描くだけの簡単なお仕事です。 https://yukicoder.me/problems/no/55 """ import sys from sys import stdin from collections import Counter input = stdin.readline def is_valid(x1, y1, x2, y2, x3, y3, x4, y4): lines = [] lines.append((x1 - x2)**2 + (y1 - y2)**2) lines.append((x1 - x3)**2 + (y1 - y3)**2) lines.append((x1 - x4)**2 + (y1 - y4)**2) lines.append((x2 - x1)**2 + (y2 - y1)**2) lines.append((x2 - x3)**2 + (y2 - y3)**2) lines.append((x2 - x4)**2 + (y2 - y4)**2) lines.append((x3 - x2)**2 + (y3 - y2)**2) lines.append((x3 - x1)**2 + (y3 - y1)**2) lines.append((x3 - x4)**2 + (y3 - y4)**2) lines.append((x4 - x2)**2 + (y4 - y2)**2) lines.append((x4 - x3)**2 + (y4 - y3)**2) lines.append((x4 - x1)**2 + (y4 - y1)**2) res = Counter(lines).most_common() if len(res) != 2: return False if res[0][1] != 8: return False if res[1][1] != 4: return False if abs(res[0][0]*2 - res[1][0]) > 0.00001: return False return True def solve(x1, y1, x2, y2, x3, y3): for y in range(-100, 101, 1): for x in range(-100, 101, 1): if is_valid(x1, y1, x2, y2, x3, y3, x, y): return x, y return None, None def main(args): x1, y1, x2, y2, x3, y3 = map(int, input().split()) x4, y4 = solve(x1, y1, x2, y2, x3, y3) if x4 is None or y4 is None: print(-1) else: print(x4, y4) if __name__ == '__main__': main(sys.argv[1:])