#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  int b[1001];
  for (int i = 0; i < 1001; i++) {
    b[i] = 0;
  }
  int count = 0;
  for (int i = 0; i < n; i++) {
    b[a[i]]++;
  }
  sort(b, b + 1001);
  for (int i = 1000; i >= 0; i--) {
    if (b[i] > 0) {
      count++;
    } else {
      break;
    }
  }
  cout << b[1000] << " " << count << endl;
  return 0;
}
