#include <bits/stdc++.h>   constexpr int MAXN = 1e2 + 2;   constexpr int MAXE = 1e4 + 4;   using namespace std;   int n;   vector<double> choc, prefixSum, suffixSum, cpy;   int main() {     std::ios::sync_with_stdio(false);     cin >> n;     choc.resize(n), prefixSum.resize(n), suffixSum.resize(n);     for (int i = 0; i < n; i++) {       cin >> choc[i];       if (i == 0)         prefixSum[0] = choc[0];       else         prefixSum[i] = prefixSum[i - 1] + choc[i];     }     for (int i = n - 1; i >= 0; i--) {       if (i == n - 1)         suffixSum[i] = choc[i];       else         suffixSum[i] = suffixSum[i + 1] + choc[i];     }     cpy = suffixSum;     reverse(cpy.begin(), cpy.end());     double mid = prefixSum[n - 1] / 2;     int midPos = upper_bound(prefixSum.begin(), prefixSum.end(), mid) -                  prefixSum.begin() - 1;     int i = 0, j = n - 1;     for (i = 0; i <= midPos; i++) {       int tAlice = prefixSum[i];       j = upper_bound(cpy.begin(), cpy.end(), tAlice * 1.0) - cpy.begin() - 1;       j = n - 1 - j;       int tBob = suffixSum[j];       if (i + 1 == j) {         if (tAlice - choc[i] > tBob)           i--;         else if (tAlice - choc[i] == tBob)           break;         break;       }       if (i + 2 == j) {         if (tAlice == tBob)           i++;         else if (tAlice < tBob)           i++;         break;       }       if (i >= j) break;     }     cout << i + 1 <<     << n - i - 1 << endl;     return 0;   }   