#include <bits/stdc++.h>
int main() {
  int n;
  int sum = 0, i;
  int max = 0;
  scanf("%d", &n);
  int arr[1005], bal[1005] = {0};
  for (i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
    bal[arr[i]]++;
  }
  for (i = 0; i < 1005; i++) {
    if (bal[i] != 0) sum++;
    if (bal[i] > max) max = bal[i];
  }
  printf("%d %d", max, sum);
}
