#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
int t;
int bar[N];
int ans;
int hi;
int p;
int vis[N];
int main() {
  while (scanf("%d", &t) != EOF) {
    hi = 1;
    ans = t;
    memset(vis, 0, sizeof(vis));
    for (int i = 0; i < t; i++) {
      scanf("%d", &bar[i]);
    }
    for (int i = 0; i < t; i++) {
      vis[i] = 1;
      p = 1;
      for (int j = i + 1; j < t; j++) {
        if (vis[j]) continue;
        if (bar[i] == bar[j]) {
          vis[j] = 1;
          p++;
          ans--;
          hi = max(hi, p);
        }
      }
    }
    printf("%d %d\n", hi, ans);
  }
  return 0;
}
