#include <bits/stdc++.h>
using namespace std;
int a[1010];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < (int)(n); i++) scanf("%d", &a[i]);
  sort(a, a + n);
  a[n] = 1010;
  int c = 1;
  int x = 0, y = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] != a[i - 1]) {
      if (x < c) x = c;
      c = 1;
      y++;
    } else
      c++;
  }
  printf("%d %d\n", x, y);
  return 0;
}
