#include <bits/stdc++.h>
int main() {
  int n;
  int maxHeight = 0;
  std::map<int, int> towers;
  std::cin >> n;
  for (int i = 0; i < n; ++i) {
    int len;
    std::cin >> len;
    maxHeight = std::max(maxHeight, ++towers[len]);
  }
  std::cout << maxHeight << " " << towers.size() << std::endl;
  return 0;
}
