#include <bits/stdc++.h>
using namespace std;
int main() {
  int A[100000], x, i, j, a, b;
  cin >> x;
  for (i = 0; i < x; i++) cin >> A[i];
  int q = 0, p = 0, r = 0, t = x - 1;
  while (t - r >= 0) {
    if (q <= p)
      q += A[r++];
    else
      p += A[t--];
  }
  cout << r << " " << x - r << endl;
  return 0;
}
