#include <bits/stdc++.h>
using namespace std;
int a[100010], vis[100010];
int main() {
  int n, i, j;
  int ans1, ans2;
  ans1 = ans2 = 0;
  scanf("%d", &n);
  int sum = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
  }
  i = 0, j = n - 1;
  int sum1, sum2;
  sum1 = sum2 = 0;
  while (1) {
    if (i == j) {
      if (sum1 >= sum2)
        ans1++;
      else
        ans2++;
      break;
    }
    if (i > j) break;
    sum1++;
    sum2++;
    if (sum1 >= a[i]) {
      ans1++;
      i++;
      sum1 = 0;
    }
    if (sum2 >= a[j]) {
      ans2++;
      j--;
      sum2 = 0;
    }
  }
  printf("%d %d\n", ans1, ans2);
  return 0;
}
