#include using namespace std; using ll=long long; #define rep2(i, a, n) for(int i = (a); i < (n); i++) #define rep(i, n) rep2(i,0,n) void out(){cout< void out(Head&& head,Tail&&... tail){cout<(tail)...);} int main(){ cin.tie(nullptr);ios_base::sync_with_stdio(false); int n;cin>>n; int a,low=9999,high=0,sum=0; map m; rep(i,n){ cin>>a; low = min(a, low); high = max(a, high); sum += a; m[a]++; //out(low,high,sum,m[low],m[high]); } //鶴亀少なくとも1匹づついる 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; } } }