#include <bits/stdc++.h>
int main() {
  std::ios::sync_with_stdio(false);
  int N;
  std::vector<int> l;
  l.resize(1001);
  std::cin >> N;
  int temp_value;
  for (int i = 0; i < N; ++i) {
    std::cin >> temp_value;
    l.at(temp_value)++;
  }
  int total_num_tower = 0, highest = 0;
  for (int i = 1; i < 1001; ++i) {
    if (l.at(i)) {
      total_num_tower++;
      if (l.at(i) > highest) {
        highest = l.at(i);
      }
    }
  }
  std::cout << highest << " " << total_num_tower;
  return 0;
}
