#include <bits/stdc++.h>
int main() {
  int m, x, y, i, a[100001], s1, s2, n = 2;
  scanf("%d", &m);
  for (i = 1; i <= m; i++) scanf("%d", &a[i]);
  x = 1;
  y = m;
  s1 = a[x];
  s2 = a[y];
  while (n < m) {
    if (s1 < s2) {
      x = x + 1;
      s1 = s1 + a[x];
      n = n + 1;
    } else {
      if (s1 > s2) {
        y = y - 1;
        s2 = s2 + a[y];
        n = n + 1;
      } else {
        x = x + 1;
        y = y - 1;
        s1 = s1 + a[x];
        s2 = s2 + a[y];
        n = n + 2;
      }
    }
  }
  printf("%d %d\n", x, m - x);
  return 0;
}
