#include <bits/stdc++.h>
using namespace std;
int N, T[101010];
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; i++) scanf("%d", T + i);
  int A = 0, B = 0;
  int n1 = 0, n2 = N - 1;
  while (n1 < n2) {
    if (T[n1] == T[n2]) {
      A++;
      n1++;
      B++;
      n2--;
    } else if (T[n1] < T[n2]) {
      A++;
      T[n2] -= T[n1];
      n1++;
      if (n1 == n2) B++, n2--;
    } else {
      B++;
      T[n1] -= T[n2];
      n2--;
    }
  }
  if (n1 == n2) A++;
  printf("%d %d\n", A, B);
  return 0;
}
