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 int INF = 0x7FFFFFFF;
struct prioritycom {
  bool operator()(const int& l, const int& r) { return l < r; }
};
template <typename T>
T lcm(T a, T b) {
  return a / __gcd(a, b) * b;
}
template <class T>
inline T bigmod(T p, T e, T M) {
  T ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class string>
long long int strton(string s) {
  long long int won;
  stringstream ss;
  ss << s;
  ss >> won;
  return won;
}
template <class T>
string ntostr(T n) {
  stringstream ss;
  ss << n;
  return ss.str();
}
template <class T>
inline T mod(T n, T m) {
  return (n % m + m) % m;
}
template <class T>
bool isprime(T n) {
  if (n % 2 == 0) {
    if (n == 2)
      return true;
    else
      return false;
  }
  T m = sqrt(n);
  for (T i = 3; i <= m; i += 2) {
    if (n % i == 0) return false;
  }
  return true;
}
bool isvowel(char ch) {
  ch = toupper(ch);
  if (ch == 'A' || ch == 'U' || ch == 'I' || ch == 'O' || ch == 'E')
    return true;
  return false;
}
double triangle_area1(double a, double b, double c) {
  double s = (a + b + c) * 0.5;
  return sqrt(s * (s - a) * (s - b) * (s - c));
}
double triangle_area2(double x1, double y1, double x2, double y2, double x3,
                      double y3) {
  return 0.5 * abs(x1 * y2 + x2 * y3 + x3 * y1 - x2 * y1 - x3 * y2 - x1 * y3);
}
double circle_area(double r, double theta) {
  return (theta * (2.0 * acos(0.0)) * r * r) / (2 * (2.0 * acos(0.0)));
}
double quad_area(double x1, double y1, double x2, double y2, double x3,
                 double y3, double x4, double y4) {
  return 0.5 * abs(x1 * y2 + x2 * y3 + x3 * y4 + x4 * y1 - x2 * y1 - x3 * y2 -
                   x4 * y3 - x1 * y4);
}
double cosangle(double a, double b, double c) {
  return acos((double)(b * b + c * c - a * a) / (double)(2 * b * c));
}
long long int Set(long long int N, long long int pos) {
  return N = N | (1ll << pos);
}
long long int reset(long long int N, long long int pos) {
  return N = N & ~(1ll << pos);
}
bool check(long long int N, long long int pos) {
  return (bool)(N & (1ll << pos));
}
long long int a[1005];
int main() {
  long long int n, hgt = 1, tot = 0, mx = 0;
  scanf("%lld", &n);
  for (long long int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
  }
  sort(a, a + n);
  for (long long int i = 1; i < n; i++) {
    if (a[i] != a[i - 1]) {
      mx = max(mx, hgt);
      hgt = 0;
      tot++;
    }
    hgt++;
  }
  mx = max(mx, hgt);
  tot++;
  printf("%lld %lld\n", mx, tot);
}
