Little Vasya has received a young builder’s kit. The kit consists of several wooden bars, the lengths of all of them are known. The bars can be put one on the top of the other if their lengths are the same.

Vasya wants to construct the minimal number of towers from the bars. Help Vasya to use the bars in the best way possible.

Input

The first line contains an integer N (1 ≤ N ≤ 1000) — the number of bars at Vasya’s disposal. The second line contains N space-separated integers li — the lengths of the bars. All the lengths are natural numbers not exceeding 1000.

Output

In one line output two numbers — the height of the largest tower and their total number. Remember that Vasya should use all the bars.

Examples

Input

3
1 2 3


Output

1 3


Input

4
6 5 6 7


Output

2 3
#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 5e18;
const long double pi = acos(-1.0);
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
inline long long mod(long long n, long long m) {
  long long ret = n % m;
  if (ret < 0) ret += m;
  return ret;
}
long double rad(long double x) { return x * pi / 180.0; }
bool isleft(pair<long long, long long> a, pair<long long, long long> b,
            pair<long long, long long> c) {
  long long det = (b.first - a.first) * (c.second - a.second) -
                  (c.first - a.first) * (b.second - a.second);
  if (det >= 0) return true;
  if (det < 0) return false;
  return false;
}
long long exp(long long a, long long b) {
  long long result = 1;
  while (b > 0) {
    if (b & 1) result = mod(result * a, MOD);
    b >>= 1;
    a = mod(a * a, MOD);
  }
  return result;
}
void solve() {
  long long ans = -INF;
  long long n;
  cin >> n;
  map<long long, long long> key;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    key[x]++;
    ans = max(key[x], ans);
  }
  cout << ans << ' ' << key.size() << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t = 1;
  while (t--) solve();
}
