def main(): n, _ = map(int, input().split()) a = set(map(int, input().split())) target = set() for i in range(1, n + 1): target.add(i) ans = 0 for ai in a: if ai in target: ans += 1 print(ans, 0) if __name__ == "__main__": main()