// yukicoder: No.55 正方形を描くだけの簡単なお仕事です。 // 2019.5.13 bal4u #include int x[5], y[5]; int dis2(int i, int j) { int dx = x[i]-x[j], dy = y[i]-y[j]; return dx*dx + dy*dy; } int main() { int i, a, b, dx, dy; for (i = 1; i <= 3; i++) scanf("%d%d", x+i, y+i); x[0] = x[3], y[0] = y[3], x[4] = x[1], y[4] = y[1]; for (i = 1; i <= 3; i++) { a = dis2(i, i-1), b = dis2(i, i+1); if (a == b) break; } if (i > 3) goto NG; if (2*a != dis2(i-1, i+1)) goto NG; printf("%d %d\n", x[i-1]+x[i+1]-x[i], y[i-1]+y[i+1]-y[i]); return 0; NG: puts("-1"); return 0; }