#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long N;
  cin >> N;
  ;
  int A[N];
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    ;
  }
  int l = 0, r = N - 1;
  int lp = 0, rp = 0;
  while (l < r) {
    while (lp <= rp && l < r) {
      lp += A[l];
      l++;
    }
    while (rp < lp && l < r) {
      rp += A[r];
      r--;
    }
  }
  if (lp <= rp) {
    cout << l + 1 << " " << N - l - 1 << endl;
  } else {
    cout << l << " " << N - l << endl;
  }
  return 0;
}
