#include <bits/stdc++.h>
using namespace std;
const int maxN = 100 * 1000 + 321;
int a[maxN];
int main() {
  int n;
  cin >> n;
  int count = 0, ans = 0, ho = 0, before = -1;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    if (a[i] != before) {
      ans = max(ans, count);
      count = 1;
      ho++;
      before = a[i];
      continue;
    }
    count++;
  }
  ans = max(ans, count);
  cout << ans << ' ' << ho << endl;
  return 0;
}
