let (|Turtle|Crane|) = function | 4 -> Turtle | _ -> Crane let N = stdin.ReadLine() |> int let a = stdin.ReadLine().Split() |> Array.map int let fstValue = a.[0] if a |> Array.forall(fun x -> x = fstValue) then let cnt = a |> Array.length match fstValue/(N-1) with | Turtle -> (0,cnt) | Crane -> (cnt,0) else let isCraneCnt = a |> Array.max let craneCnt = a |> Array.where(fun x -> x=isCraneCnt) |> Array.length let turtleCnt = N - craneCnt (craneCnt,turtleCnt) |> (fun (c,t) -> printfn "%i %i" c t)