#include "bits/stdc++.h" using namespace std; int main(){ int N; cin >> N; int low = 9999, high = 0, sum = 0; map m; for (int i = 0; i < N; i++) { int temp; cin >> temp; low = min(temp, low); high = max(temp, high); sum += temp; m[temp]++; } if (m.size() == 2){ cout << m[high] << " " << m[low] << endl; } else{ if (sum / N / N >= 2){ cout << 0 << " " << N << endl; } else{ cout << N << " " << 0 << endl; } } }