#include <bits/stdc++.h>
using namespace std;
void solve();
signed main() { solve(); }
void solve() {
  unordered_map<long long, long long> um;
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  long long p = 1, hp = 1;
  long long cnt = 0;
  cnt++;
  for (long long i = 1; i < n; i++) {
    if (a[i - 1] != a[i]) {
      cnt++;
      p = 1;
    }
    if (a[i] == a[i - 1]) {
      p++;
      if (p > hp) {
        hp = p;
      }
    }
  }
  cout << hp << ' ' << cnt << endl;
}
