#include <bits/stdc++.h>
using namespace std;
int a[100007];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  int l = 0, r = n - 1;
  int sum1 = 0;
  int sum2 = 0;
  int cnt1 = 0;
  int cnt2 = 0;
  while (l <= r) {
    if (sum1 <= sum2) {
      sum1 = sum1 + a[l];
      ++l;
      ++cnt1;
    } else {
      sum2 = sum2 + a[r];
      --r;
      ++cnt2;
    }
  }
  cout << cnt1 << " " << cnt2;
  return 0;
}
