func main() var N: int :: cui@input().toInt(&) var a: []int :: #[N]int var ss: [][]char :: cui@input().split(" ") for i(0, N - 1) do a[i] :: ss[i].toInt(&) end for var ans: []char if(a.min() = a.max()) if(a[0] = (N - 1) * 2) do ans :: "\{N} 0\n" else do ans :: "0 \{N}\n" end if else var k: int :: (a.max() + 2 - 2 * N) / 2 do ans :: "\{N - k} \{k}\n" end if do cui@print(ans) end func