#include <bits/stdc++.h>
using namespace std;
int v[1000000];
int main() {
  int n, i, ia, ib, ta, tb, nra = 0, nrb = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> v[i];
  }
  ia = 0;
  ib = n - 1;
  ta = tb = 0;
  while (ia <= ib) {
    if (ta <= tb) {
      nra++;
      ta += v[ia];
      ia++;
    } else {
      nrb++;
      tb += v[ib];
      ib--;
    }
  }
  cout << nra << " " << nrb;
  return 0;
}
