#include <bits/stdc++.h>
using namespace std;
long long n, a[1001], x, z;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    a[x]++;
  }
  x = 0;
  for (int i = 1; i <= 1000; i++) {
    if (a[i] > 0) {
      x++;
      z = max(z, a[i]);
    }
  }
  cout << z << endl;
  cout << x << endl;
}
