import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Scanner; import java.util.Set; public class Main { public static final int SIZE = 3; public static boolean check(final int N, int[] xs, int[] ys){ final int diff = (xs[0] - xs[1]) * (xs[0] - xs[1]) + (ys[0] - ys[1]) * (ys[0] - ys[1]); //System.out.println(Arrays.toString(xs) + " " + Arrays.toString(ys)); for(int i = 1; i < N; i++){ final int new_diff = (xs[i] - xs[(i + 1) % N]) * (xs[i] - xs[(i + 1) % N]) + (ys[i] - ys[(i + 1) % N]) * (ys[i] - ys[(i + 1) % N]); //System.out.println(diff + " " + new_diff + " " + xs[i] + " " + ys[i] + " " + xs[i + 1] + " " + ys[i + 1]); if(diff != new_diff){ return false; } } return true; } public static void main(String[] args){ Scanner sc = new Scanner(System.in); int[] xs = new int[SIZE]; int[] ys = new int[SIZE]; for(int i = 0; i < SIZE; i++){ final int x = sc.nextInt(); final int y = sc.nextInt(); xs[i] = x; ys[i] = y; } int diff_max = Integer.MIN_VALUE; int far_1_point = -1, far_2_point = -1; for(int i = 0; i < SIZE; i++){ for(int j = i + 1; j < SIZE; j++){ final int diff = (xs[i] - xs[j]) * (xs[i] - xs[j]) + (ys[i] - ys[j]) * (ys[i] - ys[j]); if(diff_max < diff){ diff_max = diff; far_1_point = i; far_2_point = j; } } } int diff_x = xs[far_2_point] - xs[far_1_point]; int diff_y = ys[far_2_point] - ys[far_1_point]; int other_1_point = far_2_point == 1 ? 2 : far_1_point == 0 ? 1 : 0; //System.out.println(far_1_point + " " + other_1_point + " " + far_2_point); if(check(4, new int[]{xs[far_1_point], xs[other_1_point], xs[far_2_point], xs[other_1_point] + diff_y}, new int[]{ys[far_1_point], ys[other_1_point], ys[far_2_point], ys[other_1_point] - diff_x})){ System.out.println((xs[other_1_point] + diff_y) + " " + (ys[other_1_point] - diff_x)); }else if(check(4, new int[]{xs[far_1_point], xs[other_1_point], xs[far_2_point], xs[other_1_point] - diff_y}, new int[]{ys[far_1_point], ys[other_1_point], ys[far_2_point], ys[other_1_point] + diff_x})){ System.out.println((xs[other_1_point] - diff_y) + " " + (ys[other_1_point] + diff_x)); }else{ System.out.println(-1); } } }