#include <bits/stdc++.h>
using namespace std;
int arr[100005];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  if (n == 1)
    cout << "1 0";
  else {
    int ia = 0, ib = n - 1, a = 1, b = 1, sa = arr[ia], sb = arr[ib];
    while (ib - ia > 1) {
      while (sa >= sb && ib - ia > 2) {
        ib--;
        sb += arr[ib];
        b++;
      }
      while (sb >= sa && ib - ia > 2) {
        ia++;
        sa += arr[ia];
        a++;
      }
      if (ib - ia <= 2) {
        if (sa == sb && ib - ia == 2)
          a++;
        else if (ib - ia == 2) {
          if (sb > sa)
            a++;
          else if (sb < sa)
            b++;
        }
        break;
      }
    }
    cout << a << " " << b;
  }
  return 0;
}
