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