var a:array[1..2000,1..2000]of longint;
d,p:array[1..2000]of longint;
xo,yo,r:array[1..2000]of real;
head,tail,i,j,x,s,n:longint;
begin
assign(input,'rollers.in');reset(input);
assign(output,'rollers.out');rewrite(output);
readln(n);
for i:=1 to n do
begin
readln(xo[i],yo[i],r[i]);
if (xo[i]=0)and(yo[i]=0)then s:=i;
end;close(input);
for i:=1 to n do
for j:=1 to n do
if sqrt(sqr(xo[i]-xo[j])+sqr(yo[i]-yo[j]))=r[i]+r[j]then a[i,j]:=1;
head:=0;tail:=1;p[1]:=s;d[s]:=1;
while head<>tail do
begin
inc(head);
x:=p[head];
for i:=1 to n do
if a[x,i]=1 then
if d[i]=0 then
begin
d[i]:=d[x]+1;
inc(tail);
p[tail]:=i;
end;
end;
x:=0;
for i:=1 to n do if d[i]>x then begin x:=d[i];s:=i;end;
writeln(xo[s]:0:0,' ',yo[s]:0:0);close(output);
end.