#include <bits/stdc++.h>
const int MaxSize = 1e5 + 2;
int n, l[MaxSize], r[MaxSize];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", l + i), l[i] += l[i - 1];
  for (int i = n; i >= 1; --i) r[i] = l[i] - l[i - 1], r[i] += r[i + 1];
  for (int i = 1; i <= n; ++i)
    if (l[i] >= r[i]) {
      if (l[i] == r[i]) ++i;
      printf("%d %d\n", i - 1, n + 1 - i);
      exit(0);
    }
}
