#include #include #include using namespace std; int main(){ int n,maxleg = 0,minleg = 200; cin >> n; int a[n]; for(int i = 0;i < n;i++){ cin >> a[i]; maxleg = max(maxleg,a[i]); minleg = min(minleg,a[i]); } if(maxleg == minleg){ if(maxleg / (n - 1) == 2) cout << n << " 0" << endl; else cout << "0 " << n << endl; }else{ stable_sort(a,a + n); int crane = count(a,a + n,maxleg); cout << crane << ' ' << n - crane << endl; } }