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
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.DecimalFormat;

public class Towers {

	static final String TESTFILENAME = "towers.txt";
	
	static final boolean OJ = true;//System.getProperty("MALINLOCAL") == null;
	static BufferedReader IN;
	static {
		try {
			IN = OJ?
					new BufferedReader(new InputStreamReader(System.in))
					: new BufferedReader(new FileReader(new File(Towers.class.getResource(TESTFILENAME).toURI())));
		}
		catch(Exception e) {
			e.printStackTrace();
		}
	}
	
	static String inStr() {
		try {
			return IN.readLine();
		} catch (IOException e) {
			e.printStackTrace();
			throw new RuntimeException(e);
		}
	}
	static int inInt() { return Integer.parseInt(inStr()); }

	static int[] inIntArr() {
		String s = inStr();
		if(s == null)
			return null;
		return toIntArr(s);
	}
	static int[] toIntArr(String s) {
		String[] sArr = s.split(" ");
		int[] iArr = new int[sArr.length];
		for(int i = 0; i < sArr.length; ++i)
			iArr[i] = Integer.parseInt(sArr[i]);
		return iArr;
	}
	static void out(String s) { System.out.println(s); }
	static void out(int i) { out(Integer.toString(i)); }
	static void out(double x) {
		out(format(x)); 
	}
	static final DecimalFormat df = new DecimalFormat("0.000000");
	private static String format(double x) {
		String s = df.format(x);
		s = s.replaceAll(",", ".");
		return s;
	}
	static void solve(int n, int[] t) {
		int[] count = new int[1001];
		int max = 0;
		int numTowers = 0;
		for (int i = 0; i < t.length; i++) {
			if(count[t[i]] == 0)
				++numTowers;
			++count[t[i]];                                
			if(count[t[i]] > max)
				max = count[t[i]];
		}
		out(max + " " + numTowers);
	}
	
	public static void main(String[] args) {
		int n = inInt();
		int[] nma = inIntArr();
		solve(n, nma);
	}

}
