import sequtils, strutils let n = parseInt readLine stdin xs = stdin.readLine.split.map parseInt max = max xs min = min xs if min == max: if xs[0] div n.pred == 2: echo n, " 0" else: echo "0 ", n else: let a = xs.countIt(it == max) b = n - a echo a, " ", b