#include <bits/stdc++.h>
void towers(int size) {
  std::unordered_map<int, int> table;
  table.reserve(size);
  int total = 0;
  int val;
  for (int i = 0; i < size; i++) {
    std::cin >> val;
    if (table.find(val) == table.end()) {
      table.emplace(val, 1);
      total++;
    } else
      table[val]++;
  }
  int max = table[val];
  for (auto it = table.begin(); it != table.end(); ++it) {
    if (it->second > max) max = it->second;
  }
  std::cout << max << ' ' << total << std::endl;
}
void towers(std::vector<int>& v) {
  std::sort(v.begin(), v.end());
  int height = 0;
  int numberDifferent = 1;
  int current = v[0];
  int maxHeight = 0;
  for (auto el : v) {
    if (current == el) {
      height++;
      if (height > maxHeight) maxHeight = height;
    } else {
      numberDifferent++;
      height = 1;
      current = el;
    }
  }
  std::cout << maxHeight << ' ' << numberDifferent << std::endl;
}
int main() {
  int size;
  std::cin >> size;
  std::vector<int> test(size);
  for (int i = 0; i < size; i++) {
    std::cin >> test[i];
  }
  towers(test);
  return 0;
}
