#include #include #include using namespace std; int main(){ int N; cin >> N; vector a(N); for (int i = 0; i < N; i++){ cin >> a[i]; } sort(a.begin(), a.end()); if (a[0] == a[N - 1]){ if (a[0] == (N - 1) * 2){ cout << N << ' ' << 0 << endl; } else { cout << 0 << ' ' << N << endl; } } else { int t = lower_bound(a.begin(), a.end(), a[N - 1]) - a.begin(); cout << N - t << ' ' << t << endl; } }