x[6],i,a,b,c;main(d){for(;~scanf("%d",x+i++););for(i=6;a=x[2]-*x,b=x[3]-x[1],c=x[4]-*x,d=x[5]-x[1],a*c+b*d|a*a+b*b-c*c-d*d&&i||i%2;)x[--i%2]^=x[i]^=x[i%2]^=x[i];i&&printf("%d %d",x[2]+c,x[3]+d)||printf("-1");exit(0);}