import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); Set set = new HashSet<>(); for (int i = 0; i < n; i++) { set.add(sc.nextInt()); } sc.close(); int max = set.size(); int min = 0; if (set.size() == 1) { min = 1; } System.out.println(max + " " + min); } }