import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

		//initialize the count of the array size
        int n = sc.nextInt();
        int[] a = new int[n];

        for(int i = 0; i < n; i++){
		//taking the input for the entire array here
            a[i] = sc.nextInt();
        }
		//considering the min element as 10^-9
        int INF = (int)1e9;
		
        int finalAnswer1 = INF;
		//intialise the max that we can see as 0
        int finalAnswer2 = 0;

        for(int i = 0; i < n; i++){
			//initilaize every time as the number may be new every time you move to new index
            int count = 0;

            for(int j = 0; j < n; j++){
				//check if the number at the present index i becomes equal while iterating 
				// over the entire array
                if(a[j] == a[i]){
                    count++;
                }
            }

            finalAnswer1 = Math.min(finalAnswer1 , count);
            finalAnswer2 = Math.max(finalAnswer2 , count);
        }

        System.out.println(finalAnswer1 + " " + finalAnswer2 );
    }
}