import strutils, sequtils var t2k4 = [0, 0] let N, a = stdin.readLine.split.map parseInt a_min = a.min if a.max != a_min: for v in a: t2k4[int(v == a_min)].inc else: t2k4[int(a[0] + 4 == 4 * a.len)] = a.len echo t2k4.join(" ")