Scanf.scanf "%d\n" (fun n->
  let rec loop i (x,y,h)=
    if i=n then (x,y,h) else
    let m = Scanf.scanf "%d %d %d\n" (fun x1 y1 h1->
            (x+x1,y+y1,h+h1)
    ) in
    loop (i+1) m
  in
  let (x,y,h) = loop 0 (0,0,0) in
  Printf.printf "%d %d %d\n" (x/n)(y/n)(h/n)

)
