#include using namespace std; int main() { int n; cin >> n; int a[n]; int a_max=0, a_min=1e5; int tsuru, kame; for(int i=0;i> a[i]; a_max = max(a_max, a[i]); a_min = min(a_min, a[i]); } if(a_max==a_min) { if((a_max+2)%n) { tsuru=0; kame=n; } else { tsuru=n; kame=0; } } else { kame = (a_max+2-2*n)/2; tsuru = n - kame; } cout << tsuru << " " << kame << endl; }