#include <stdio.h>
int main() {
int i, j, x[3], y[3];
while(i--){
scanf("%d%d%d%d%d%d",&x
[0], &y
[0], &x
[1], &y
[1], &x
[2], &y
[2]); printf("%d %d\n", (x
[0]==x
[1])?x
[2]:x
[0]+x
[1]-x
[2], (y
[0]==y
[1])?y
[2]:y
[0]+y
[1]-y
[2]); }
return 0;
}
/*
int main() {
int i, j, x, y, rx=0, ry=0;
scanf("%d",&i);
while(i--){
scanf("%d%d%d%d",&x, &y,&rx, &ry);
rx = (rx==x)?0:x+rx;
ry = (ry==y)?0:y+ry;
scanf("%d%d",&x, &y);
printf("%d %d\n", (rx==0)?x:rx-x, (ry==0)?y:ry-y);
/*
rx = ry = 0;
j = 3;
while(j--){
scanf("%d%d",&x, &y);
rx += (rx==x)?-x:x;
ry += (ry==y)?-y:y;
}
printf("%d %d\n", (rx==x)?rx:rx-2*x, (ry==y)?ry:ry-2*y);
* /
}
return 0;
}
*/
/*
int main() {
int i, j, x[3], y[3];
scanf("%d",&i);
while(i--){
j=3;
while(j--){
scanf("%d%d", x+j, y+j);
}
if(x[0]==x[1]){
printf("%d ",x[2]);
} else {
printf("%d ", x[0]+x[1]-x[2]);
}
if(y[0]==y[1]){
printf("%d\n",y[2]);
} else {
printf("%d\n", y[0]+y[1]-y[2]);
}
}
return 0;
}*/
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKCkgewoJaW50IGksIGosIHhbM10sIHlbM107CglzY2FuZigiJWQiLCZpKTsKCXdoaWxlKGktLSl7CgkJc2NhbmYoIiVkJWQlZCVkJWQlZCIsJnhbMF0sICZ5WzBdLCAmeFsxXSwgJnlbMV0sICZ4WzJdLCAmeVsyXSk7CgkJcHJpbnRmKCIlZCAlZFxuIiwgKHhbMF09PXhbMV0pP3hbMl06eFswXSt4WzFdLXhbMl0sICh5WzBdPT15WzFdKT95WzJdOnlbMF0reVsxXS15WzJdKTsKCX0KCXJldHVybiAwOwp9Ci8qCmludCBtYWluKCkgewoJaW50IGksIGosIHg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