#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<long> v;
  long n, m, i, l, r, sl = 0, sr = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> l;
    v.push_back(l);
  }
  l = -1;
  r = n;
  sl = 0;
  sr = 0;
  while (l < r) {
    if (sr < sl) {
      r--;
      sr += v[r];
    } else {
      l++;
      sl += v[l];
    }
  }
  if ((r == l) && (sl <= sr)) l++;
  cout << l << " " << n - l;
  return 0;
}
