let a = stdin.ReadLine() |> int let b = stdin.ReadLine().Split(' ') |> Seq.map int |> Seq.sum let x = (2*a-b)/(-2) printfn "%d %d" x (a-x)