let () =
  Scanf.scanf "%d %d %d %d\n"
    (fun x1 y1 x2 y2 ->
       let lst = if x1 = x2 then
         let len = abs(y1-y2) in
         if y1 > y2 then [(x2+len); y2; (x1+len); y1]
         else [(x2-len); y2; (x1-len); y1]
       else if y1 = y2 then
         let len = abs(x1 - x2) in
         if x1 > x2 then [x2; (y2 - len); x1; (y1-len)]
         else [x2; (y2 + len); x1; (y1 + len)]
       else
         let x = abs(x1 - x2) in
         let y = abs(y1 - y2) in
         if y1 > y2 && x > y then [x2 - y; y2 - x; x1 - y; y1 - x]
         else if y1 > y2 && x < y then [x2 + y; y2 + x; x1 + y; y1 + x]
         else if y1 < y2 && x > y then [x2 + x; y2 + y; y1 + y; y1 + x]
         else [x2 - y; y2 - x; x1 - y; y1 - x]
       in
       List.fold_right (fun a b -> string_of_int a ^ " " ^ b) lst "")
  |> print_string
