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