#include <bits/stdc++.h>
using namespace std;
int a[100010];
int p1, p2, l, r;
int n;
int num1, num2;
int main() {
  while (~scanf("%d", &n)) {
    for (int i = 0; i < n; ++i) {
      scanf("%d", &a[i]);
    }
    num1 = num2 = 0;
    p1 = 0;
    p2 = n - 1;
    while (p1 <= p2) {
      if (l <= r) {
        l += a[p1];
        p1++;
        num1++;
      } else {
        r += a[p2];
        p2--;
        num2++;
      }
    }
    cout << num1 << " " << num2 << endl;
  }
  return 0;
}
