n = int(input()) a = list(map(int, input().split())) s_candidate1 = a[0] + 2 s_candidate2 = a[0] + 4 def is_valid(s): for num in a: if (num + 2 != s) and (num + 4 != s): return False return True s = None if is_valid(s_candidate1): s = s_candidate1 else: s = s_candidate2 c = (4 * n - s) // 2 t = n - c # Verify the count of cranes count_c = 0 for num in a: if num + 2 == s: count_c += 1 print(c, t)