fork download
  1. program rettangolo;
  2. var T, test :longint;
  3.  
  4.  
  5. procedure solve (T :longint);
  6. var x1, x2, x3, x4, y1,y2,y3, y4: longint;
  7.  
  8. begin
  9. readln(x1,y1);
  10. readln(x2,y2);
  11. readln(x3,y3);
  12. x4:= (x1 xor x2) xor x3;
  13. y4:= (y1 xor y2) xor y3;
  14. Write('Case #', test, ': ');
  15. WriteLn(x4,' ',y4);
  16. end;
  17. begin
  18. ReadLn(T);
  19. for test:=1 to T do begin readln; solve(T); end;
  20. end.
Success #stdin #stdout 0s 5288KB
stdin
2

0 0
42 0
0 42

7 8
7 5
2 8
stdout
Case #1: 42 42
Case #2: 2 5