import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner scan = new Scanner(System.in)) { int x1 = Integer.parseInt(scan.next()); int y1 = Integer.parseInt(scan.next()); int x2 = Integer.parseInt(scan.next()); int y2 = Integer.parseInt(scan.next()); int x3 = Integer.parseInt(scan.next()); int y3 = Integer.parseInt(scan.next()); int list[] = new int[6]; for(int y4=-200; y4<=200; y4++) { for(int x4=-200; x4<=200; x4++) { list[0] = dis(x1,y1,x2,y2); list[1] = dis(x2,y2,x3,y3); list[2] = dis(x3,y3,x4,y4); list[3] = dis(x4,y4,x1,y1); list[4] = dis(x1,y1,x3,y3); list[5] = dis(x2,y2,x4,y4); Arrays.sort(list); int v = list[0]; if(list[0] == v && list[1] == v && list[2] == v && list[3] == v && list[4] == v*2 &&list[5] == v*2) { System.out.println(x4 + " " + y4); return; } } } System.out.println(-1); } } static int dis(int x1, int y1, int x2, int y2) { return ((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)); } }