#include using namespace std; int main() { int N; int a[50]; int x = 0, y = 0; int count = 1; cin >> N; cin >> a[0]; x = a[0]; for (int i = 1; i < N;i++) { cin >> a[i]; if (x != a[i]) { y = a[i]; } else { count++; } } if (x == 0 || y == 0) { if (x == (N - 1) * 4) { cout << 0 << " " << N << endl; } else { cout << N << " " << 0 << endl; } return 0; } if (x >= y) { cout << count << " " << N - count << endl; } else { cout << N - count << " " << count << endl; } return 0; }