#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n;
  cin >> n;
  long long a[n];
  map<long long, long long> m;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    m[a[i]]++;
  }
  long long ctr = 0, mx = 1;
  for (auto i : m) {
    ctr++;
    if (i.second > 1) mx = max(mx, i.second);
  }
  cout << mx << " " << ctr;
  return 0;
}
