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