#include <bits/stdc++.h>
using namespace std;
int main() {
  int say1, say2, maxyuk = -9999, dizi[1005], n, maxi = -9999, yuk[1005] = {0},
                  gen[1005] = {0}, i, j;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &dizi[i]);
    yuk[dizi[i]]++;
    gen[dizi[i]]++;
    if (maxi < dizi[i]) maxi = dizi[i];
  }
  say1 = say2 = 0;
  for (i = 0; i <= maxi; i++) {
    if (yuk[i] > maxyuk) maxyuk = yuk[i];
    if (gen[i] > 0) say1++;
  }
  cout << maxyuk << ' ' << say1 << endl;
  return 0;
}
