#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long int t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    long long int arr[n];
    long long int temp[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      temp[i] = arr[i];
    }
    long long int bob = n - 1;
    long long int al = 0;
    long long int ca = 0, cb = 0;
    bool a_still_eating = false;
    bool b_still_eating = false;
    while (al <= bob) {
      long long int maxi = max(temp[bob], temp[al]);
      long long int sb = 0;
      long long int sa = 0;
      if (al == bob && temp[al] == arr[al]) {
        ca++;
        al++;
        break;
      }
      if (al == bob) {
        if (a_still_eating)
          ca++;
        else
          cb++;
        break;
      }
      while (sa < maxi && al <= bob) {
        if (temp[al] <= maxi - sa) {
          ca++;
          sa += temp[al];
          temp[al] = 0;
          al++;
          a_still_eating = false;
        } else {
          temp[al] -= (maxi - sa);
          sa = maxi;
          if (temp[al] > 0 && temp[al] < arr[al])
            a_still_eating = true;
          else
            a_still_eating = false;
        }
      }
      while (sb < maxi && bob >= al) {
        if (temp[bob] <= maxi - sb) {
          cb++;
          sb += temp[bob];
          temp[bob] = 0;
          bob--;
          b_still_eating = false;
        } else {
          temp[bob] -= (maxi - sb);
          sb = maxi;
          if (temp[bob] > 0 && temp[bob] < arr[bob])
            b_still_eating = true;
          else
            b_still_eating = false;
        }
      }
    }
    cout << ca << " " << cb;
  }
  return 0;
}
