#include <bits/stdc++.h>
using namespace std;
int a[100005], l, r;
int i, n;
int main() {
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n == 1) {
    cout << "1 0" << endl;
    return 0;
  }
  l = 0, r = n - 1;
  while (l != r - 1) {
    if (a[l] > a[r]) {
      a[l] -= a[r];
      --r;
    } else {
      a[r] -= a[l];
      ++l;
    }
  }
  cout << l + 1 << ' ' << n - l - 1;
  return 0;
}
