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