#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } int x = -1; for (int i = 0; i < n-1; i++) { if (a[i] == a[i+1]) continue; if (a[i] < a[i+1]) { x = a[i]+4; break; }else { x = a[i]+2; break; } } if (x == -1) x = a[0]+2; int kame = 0, turu = 0; for (int i = 0; i < n; i++) { if (a[i] == x-2) { turu++; }else { kame++; } } cout << turu << " " << kame << endl; }