#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, a_time = 0, b_time = 0;
  cin >> n;
  vector<int> a(n);
  for (i = 0; i < n; i++) cin >> a[i];
  int l = 0, r = n - 1;
  while (l < r) {
    if (a_time < b_time) {
      a_time += a[l];
      l++;
    } else {
      b_time += a[r];
      r--;
    }
  }
  if (l == r) {
    if (a_time <= b_time) {
      l++;
    } else {
      r--;
    }
  }
  cout << l << " " << n - r - 1;
}
