#include <bits/stdc++.h>
using namespace std;
int ted[1010];
int main() {
  memset(ted, 0, sizeof ted);
  int n;
  cin >> n;
  while (n--) {
    int x;
    cin >> x;
    ted[x]++;
  }
  int ans = 0;
  int mx = 0;
  for (int i = 1; i <= 1000; i++)
    if (ted[i]) {
      ans++;
      mx = max(mx, ted[i]);
    }
  cout << mx << ' ' << ans << endl;
  return 0;
}
