#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[10000], x = 0, t, y = 1, z = 0;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> a[i];
  }
  sort(a, a + t);
  for (int i = 0; i < t; i++) {
    if (a[i] != a[i + 1]) {
      x++;
      y = 1;
    } else
      y++;
    if (y > z) z = y;
  }
  cout << z << " " << x << endl;
  return 0;
}
