#include <bits/stdc++.h>
int main() {
  int n, alice = 0, bob = 0, i, j, bar[100005];
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d", &bar[i]);
  for (i = 0, j = n - 1; i < j;) {
    if (alice == bob)
      alice += bar[i++], bob += bar[j--];
    else if (alice > bob)
      bob += bar[j--];
    else
      alice += bar[i++];
  }
  if (alice <= bob && i == j)
    i++;
  else if (j == i)
    j--;
  printf("%d %d\n", i, n - j - 1);
  return 0;
}
