#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const double eps = 1e-8;
const double pi = acos(-1.0);
const int dx[] = {-1, 1, 0, 0};
const int dy[] = {0, 0, -1, 1};
int a[100005];
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  int l = 0, r = n - 1, first = 0, second = 0;
  while (l <= r) {
    if (first + a[l] <= second + a[r]) {
      first += a[l];
      ++l;
    } else {
      second += a[r];
      --r;
    }
  }
  cout << l << " " << n - l << "\n";
  return 0;
}
