#include <bits/stdc++.h>
using namespace std;
long long n, a, us[1000000], k, mx;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a;
    if (us[a] == 0) {
      k++;
    }
    us[a]++;
    mx = max(mx, us[a]);
  }
  cout << mx << " " << k;
}
