#include <bits/stdc++.h>
using namespace std;
vector<int> a;
int main() {
  int n, x, l, r, t1, t2;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    a.push_back(x);
  }
  l = -1;
  t1 = 0;
  t2 = 0;
  r = n;
  while (r - l > 1) {
    while ((t1 <= t2) && (r - l > 1)) {
      t1 += a[l + 1];
      l++;
    }
    while ((t2 < t1) && (r - l > 1)) {
      t2 += a[r - 1];
      r--;
    }
  }
  cout << l + 1 << ' ' << n - l - 1;
}
