#include #include using namespace std; int main(){ pair p[3]; for(int i = 0; i < 3; i++) cin >> p[i].first >> p[i].second; sort(p, p + 3); bool eop = true; do{ int vx1 = p[1].first - p[0].first, vy1 = p[1].second - p[0].second, vx2 = p[2].first - p[0].first, vy2 = p[2].second - p[0].second; if(vx1 * vx2 + vy1 * vy2 == 0 && vx1 * vx1 + vy1 * vy1 == vx2 * vx2 + vy2 * vy2){ cout << vx1+vx2+p[0].first << ' ' << vy1+vy2+p[0].second << endl; break; } }while(eop = next_permutation(p, p+3)); if(!eop){ cout << -1 << endl; } return 0; }