#include <bits/stdc++.h>
using namespace std;
const double PI = 3.141592654;
void fast() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL), cout.tie(NULL);
}
int main() {
  fast();
  int x, a;
  cin >> x;
  set<int> st;
  map<int, int> mp;
  for (int(i) = 0; (i) < (long long)(x); (i)++) {
    cin >> a;
    mp[a]++;
    st.insert(a);
  }
  int z = st.size(), mx = 0;
  for (auto e : mp) mx = max(mx, e.second);
  cout << mx << " " << z << endl;
  return 0;
}
