#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #include #include //#include "util.h" using namespace std; typedef long long lint; typedef pair Pii; #define PI 3.14159265358979323846 #define EPS 1e-6 int main() { int N, t; cin >> N; map m; for (int i = 0; i < N; i++) cin >> t, m[t]++; if (m.size() == 1) { if (t / (N - 1) == 2) cout << m[t] << " " << 0 << endl; else cout << 0 << " " << m[t] << endl; } else cout << m.begin()->second << " " << (++m.begin())->second << endl; return 0; }