#include <bits/stdc++.h>
using namespace std;
int n;
int a[1005];
int main() {
  int mx = 1;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  int s = 0;
  for (int i = 0; i < n; i++) {
    s++;
    int l = 1;
    if (a[i] == a[i + 1])
      while (a[i] == a[i + 1]) {
        i++;
        l++;
      }
    mx = max(l, mx);
  }
  cout << mx << " " << s << endl;
  return 0;
}
