#include <bits/stdc++.h>
using namespace std;
int a[100005], alice, bob, l, r, m;
int main() {
  int n;
  cin >> n;
  l = 1, r = n;
  int alice = 0, bob = 0, alice1 = 0, bob1 = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  while (l <= r) {
    while (alice <= bob && l <= r) {
      alice += a[l];
      alice1++;
      l++;
    }
    while (alice > bob && l <= r) {
      bob += a[r];
      bob1++;
      r--;
    }
  }
  cout << alice1 << " " << bob1;
  return 0;
}
