Little Vasya has received a young builder’s kit. The kit consists of several wooden bars, the lengths of all of them are known. The bars can be put one on the top of the other if their lengths are the same.

Vasya wants to construct the minimal number of towers from the bars. Help Vasya to use the bars in the best way possible.

Input

The first line contains an integer N (1 ≤ N ≤ 1000) — the number of bars at Vasya’s disposal. The second line contains N space-separated integers li — the lengths of the bars. All the lengths are natural numbers not exceeding 1000.

Output

In one line output two numbers — the height of the largest tower and their total number. Remember that Vasya should use all the bars.

Examples

Input

3
1 2 3


Output

1 3


Input

4
6 5 6 7


Output

2 3
//package com.peterdang.hackerrank;

import java.io.IOException;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Hackerrank {

    static class Student {
        public int ratting;
        public int index;
        public int pos;

        public Student(int ratting, int index) {
            this.ratting = ratting;
            this.index = index;
        }
    }

    public static void main(String[] args) throws IOException {
        Scanner scanner = new Scanner(System.in);
        int n;
        n = scanner.nextInt();
        Integer[] A = new Integer[n];
        for (int i = 0; i < n; i++) {
            A[i] = scanner.nextInt();
        }

        Arrays.sort(A, new Comparator<Integer>() {
            @Override
            public int compare(Integer integer, Integer t1) {
                return t1 - integer;
            }
        });

        int countDistinct = 0;
        int largest = 1;
        int countHeight = 1;
        int crrE = -1;
        for (int i = 0; i < A.length; i++) {
            if(A[i] == crrE){
                countHeight++;
            }else{
                crrE = A[i];
                largest = Math.max(countHeight, largest);
                countDistinct++;
                countHeight = 1;
            }
        }
        largest = Math.max(countHeight, largest);

        System.out.print(largest + " " + countDistinct);
    }
}
