import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); TreeMap map = new TreeMap<>(); for (int i = 0; i < n; i++) { int x = sc.nextInt(); map.put(x, map.getOrDefault(x, 0) + 1); } int bird; int turtle; if (map.size() == 1) { if (map.firstKey() / (n - 1) == 2) { bird = n; turtle = 0; } else { bird = 0; turtle = n; } } else { bird = map.firstEntry().getValue(); turtle = map.lastEntry().getValue(); } System.out.println(bird + " " + turtle); } }