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