#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  int talice = 0;
  int tbob = 0;
  int ialice = 0;
  int ibob = n - 1;
  while (ialice <= ibob) {
    if (talice <= tbob) {
      talice += v[ialice];
      ialice++;
    } else {
      tbob += v[ibob];
      ibob--;
    }
  }
  cout << ialice << " " << n - ialice << endl;
}
