#include <bits/stdc++.h>
using namespace std;
int min(int a, int b) { return a > b ? b : a; }
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n == 1) {
    cout << 1 << " " << 0;
  } else if (n == 2) {
    cout << 1 << " " << 1;
  } else {
    int l = 0, r = (n - 1);
    int countl = 0, countr = 0;
    bool lwaiting = false;
    bool rwaiting = false;
    while (l <= r) {
      int minvalue = min(a[l], a[r]);
      a[l] -= minvalue;
      a[r] -= minvalue;
      if (a[l] != 0 && l == r) {
        if (rwaiting) {
          countr++;
        } else {
          countl++;
        }
        break;
      }
      if (a[l] == 0 && a[r] == 0) {
        countl++;
        countr++;
        l++;
        r--;
        lwaiting = false;
        rwaiting = false;
      } else if (a[l] == 0) {
        countl++;
        lwaiting = false;
        rwaiting = true;
        l++;
      } else if (a[r] == 0) {
        countr++;
        r--;
        lwaiting = true;
        rwaiting = false;
      }
    }
    cout << countl << " " << countr;
  }
  return 0;
}
