#include <bits/stdc++.h>
int a[100010] = {0};
int main() {
  int n, i;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  int xm = 0;
  int xs = n + 1;
  long long sum = 0, sum1 = 0;
  while (1) {
    if (xm + 1 == xs) {
      break;
    }
    if (sum <= sum1) {
      xm++;
      sum = sum + a[xm];
    } else {
      xs--;
      sum1 = sum1 + a[xs];
    }
  }
  printf("%d %d", xm, n - xm);
  return 0;
}
