#include <bits/stdc++.h>
using namespace std;
int a[10001];
int main() {
  int n;
  while (cin >> n) {
    int temp;
    memset(a, 0, sizeof(a));
    for (int i = 0; i < n; i++) {
      scanf("%d", &temp);
      a[temp]++;
    }
    sort(a, a + 1001);
    temp = 0;
    for (int i = 1000; i >= 0; i--)
      if (a[i] > 0)
        temp++;
      else
        break;
    cout << a[1000] << " " << temp << "\n";
  }
  return 0;
}
