#include <bits/stdc++.h>
using namespace std;
int i;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> x;
  for (int i = 0; i < n; i++) {
    int l;
    scanf("%d", &l);
    x.push_back(l);
  }
  int l = 0, ta = 0, tb = 0, r = n - 1, a = 0, b = 0;
  while (l <= r) {
    if (ta <= tb) {
      ta += x[l];
      l++;
      a++;
    } else {
      tb += x[r];
      r--;
      b++;
    }
  }
  cout << a << " " << b;
  return 0;
}
