import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = sc.nextInt(); } int min = 0; boolean allSame = true; for (int i = 1; i < n; i++) { if (a[i] != a[0]) { allSame = false; break; } } if (allSame) { min = 1; } int max = n; HashSet hs = new HashSet(); for (int i = 0; i < n; i++) { if (1 <= a[i] && a[i] <= m) { if (hs.contains(a[i])) { max--; } else { hs.add(a[i]); } } else { max--; } } System.out.println(max + " " + min); } }