#include #include using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int XY[3][2]; double sides[3]; cin >> XY[0][0] >> XY[0][1] >> XY[1][0] >> XY[1][1] >> XY[2][0] >> XY[2][1]; sides[0] = hypot(XY[0][0] - XY[1][0], XY[0][1] - XY[1][1]); sides[1] = hypot(XY[1][0] - XY[2][0], XY[1][1] - XY[2][1]); sides[2] = hypot(XY[2][0] - XY[0][0], XY[2][1] - XY[0][1]); for (int i = 0; i < 3;i++) { if (sides[i % 3] == sides[(i + 1) % 3]) { int c1 = 10000 * sides[i % 3] * sqrt(2), c2 = 10000 * sides[(i + 2) % 3]; if (c1 == c2) { cout << XY[(i + 2) % 3][0] - XY[(i + 1) % 3][0] + XY[i % 3][0] << " " << XY[(i + 2) % 3][1] - XY[(i + 1) % 3][1] + XY[i % 3][1] << endl; return 0; } } } cout << -1 << endl; return 0; }