#include <bits/stdc++.h>
int main() {
  int s[100002];
  int n;
  while (scanf("%d", &n) != EOF) {
    int i;
    for (i = 1; i <= n; i++) scanf("%d", &s[i]);
    int sum1 = 0, sum2 = 0;
    int a = 1, b = n;
    while (b >= a) {
      if (sum1 <= sum2)
        sum1 += s[a++];
      else
        sum2 += s[b--];
    }
    a = a - 1;
    printf("%d %d\n", a, n - a);
  }
  return 0;
}
