#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  int ans = 0;
  int mx = 0;
  int height = 1;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] == a[i + 1]) {
      height++;
    } else {
      if (height > mx) {
        mx = height;
      }
      ans++;
      height = 1;
    }
  }
  if (height > mx) {
    mx = height;
  }
  cout << mx << " " << ans + 1 << endl;
}
