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