#include <bits/stdc++.h>
using namespace std;
int prog() {
  long long int i, j, k, n, m, x, y, z, t, tl, tr;
  cin >> n;
  long long int *ti = new long long int[n];
  for (i = 0; i < n; i++) cin >> ti[i];
  long long int lf, rt;
  lf = -1;
  rt = n;
  x = 0;
  y = 0;
  tl = 0;
  tr = 0;
  while (rt - lf > 1) {
    if (tl <= tr) {
      lf++;
      tl += ti[lf];
      x++;
    } else {
      rt--;
      tr += ti[rt];
      y++;
    }
  }
  cout << x << ' ' << y;
  return 0;
}
int main() {
  long long int t = 1;
  while (t--) prog();
  return 0;
}
