#include <bits/stdc++.h>
using namespace std;
long long int arr[1000005];
int main() {
  int t;
  scanf("%d", &t);
  for (int i = 0; i < t; i++) {
    scanf("%lld", &arr[i]);
  }
  int sum1 = 0, sum2 = 0;
  long long int n = 0, m = 0;
  int l = 0, r = t - 1;
  while (l <= r) {
    if (n <= m) {
      n += arr[l++];
      sum1++;
    } else {
      m += arr[r--];
      sum2++;
    }
  }
  printf("%d %d\n", sum1, sum2);
  return 0;
}
