#include<stdio.h>
int main(void){
  char *s="python3 -c\""
"A=abs;n=int(input());p=eval('list(map(int,input().split())),'*n);x,y,h=[x for x in p if x[2]][0]\n"
"for I in range(10201):j,i=I//101,I%101;H=h+A(x-j)+A(y-i);print(*(j,i,H)*all(u==max(H-A(s-j)-A(t-i),0)for s,t,u in p))\n"
"\"";
  system(s);
  return 0;
}            