#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, c1 = 0, c2 = 0;
  cin >> n;
  vector<int> arr(n);
  for (i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int left = 0, right = n - 1, t1 = 0, t2 = 0;
  while (left <= right) {
    if (t1 <= t2) {
      c1++;
      t1 += arr[left++];
    } else {
      c2++;
      t2 += arr[right--];
    }
  }
  cout << c1 << " " << c2 << endl;
}
