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