#include <bits/stdc++.h>
using namespace std;
int a[2000005];
int main() {
  int n;
  cin >> n;
  map<int, int> mp;
  int mx = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mp[a[i]]++;
    mx = max(mx, mp[a[i]]);
  }
  cout << mx << " " << (int)mp.size() << endl;
}
