#include using namespace std; typedef long long ll; int main() { int n; cin >> n; vector a(n); set st; for (int i = 0; i < n; ++i) { cin >> a[i]; st.insert(a[i]); } if (st.size() == 1) { if (a[0] / 2 == n - 1) { cout << n << " " << 0 << '\n'; } else { cout << 0 << " " << n << '\n'; } } else { int mi = *st.begin(); int t = 0; for (int i = 0 ; i < n; ++i) { if (a[i] == mi) t++; } cout << n - t << " " << t << '\n'; } return 0; }