#include <bits/stdc++.h>
int n, i, arr[500000], a, b, sa, sb, ai = 1, bj;
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &arr[i]);
  bj = n;
  while (ai < bj) {
    a++;
    b++;
    if (a == arr[ai]) {
      sa++;
      ai++;
      a = 0;
    }
    if (ai == bj && !a && !b) {
      sa++;
      break;
    }
    if (b == arr[bj]) {
      sb++;
      bj--;
      b = 0;
    }
    if (ai == bj && !a && !b) {
      sa++;
      break;
    }
  }
  if (sa + sb < n)
    if (a >= b)
      sa++;
    else
      sb++;
  printf("%d %d", sa, sb);
}
