#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int bob = 0, bo = 0;
  int alice = 0, al = 0;
  int j = n - 1, i = 0;
  while (j >= i) {
    if (alice == bob && i == j) {
      alice = alice + a[i];
      i++;
      al++;
    } else if (alice > bob) {
      bob = bob + a[j];
      j--;
      bo++;
    } else if (alice < bob) {
      alice = alice + a[i];
      i++;
      al++;
    } else if (alice == bob) {
      alice = alice + a[i];
      i++;
      al++;
      bob = bob + a[j];
      j--;
      bo++;
    }
  }
  cout << al << " " << bo;
}
