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