#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[1005];
int main() {
  int b[1005], i, n, s = 0, j, max = 0, k = 0;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &a[i].first), a[i].second = 0;
  sort(a + 1, a + n + 1);
  for (i = 1; i < n; i++)
    for (j = i + 1; j <= n; j++)
      if (a[i].first == a[j].first && a[i].second != 1) a[j].second = 1;
  for (i = 1; i <= n; i++) {
    if (a[i].second == 1)
      s++;
    else {
      if (s > max) max = s;
      s = 0;
    }
  }
  if (s > max) max = s;
  printf("%d\n", max + 1);
  for (i = 1; i <= n; i++)
    if (a[i].second == 0) k++;
  printf("%d\n", k);
  return 0;
}
