#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    int n;
    cin >> n;
    int a[n], f[1005] = {0};
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      f[a[i]]++;
    }
    int h = 0, t = 0;
    for (int i = 0; i < 1005; i++) {
      if (f[i]) t++;
      h = max(h, f[i]);
    }
    cout << h << " " << t;
  }
  return 0;
}
