#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long cnt[1005];
  memset(cnt, 0, sizeof(cnt));
  for (long long i = 1; i <= n; i++) {
    long long x;
    cin >> x;
    cnt[x]++;
  }
  long long maks = 0, x = 0;
  for (long long i = 1; i <= 1000; i++) {
    x += cnt[i] > 0 ? 1 : 0;
    maks = max(maks, cnt[i]);
  }
  cout << maks << " " << x << endl;
}
