#include <bits/stdc++.h>
using namespace std;
int n, maxx, cnt;
int a[1000007], b[100007];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    b[a[i]]++;
  }
  for (int i = 1; i <= 100000; i++) {
    if (b[i] > 0) cnt++;
    maxx = max(maxx, b[i]);
  }
  cout << maxx << " " << cnt;
  return 0;
}
