#include #include using namespace std; class range {private: struct I{int x;int operator*(){return x;}bool operator!=(I& lhs){return x ds = { p1.dist2(p2), p2.dist2(p3), p3.dist2(p1) }; sort(ds.begin(), ds.end()); int a = ds[0], b = ds[1], c = ds[2]; if(a != b || a + b != c) { puts("-1"); return 0; } for(int x : range(-300, 300)) { for(int y : range(-300, 300)) { if(x == x1 && y == y1) { continue; } if(x == x2 && y == y2) { continue; } if(x == x3 && y == y3) { continue; } Point p({x, y}); int d1 = p.dist2(p1), d2 = p.dist2(p2), d3 = p.dist2(p3); int check = 0; if(d1 == a) { check++; } if(d2 == a) { check++; } if(d3 == a) { check++; } if(check == 2) { printf("%d %d\n", x, y); return 0; } } } puts("(ΦωΦ)"); return 0; }