#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int a[100005];
  int l, r, x, y;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  x = a[l = 1];
  y = a[r = n];
  while (l <= r) {
    if (x <= y) {
      x += a[++l];
    } else {
      y += a[--r];
    }
  }
  printf("%d %d\n", l - 1, n - l + 1);
  return 0;
}
