#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  long long a[n];
  for (auto& x : a) cin >> x;
  if (n == 1) return puts("1 0") * 0;
  long long t = 0, i = 0, j = n - 1, alice = 0, bob = 0, alt = a[0],
            bot = a[n - 1];
  while (i <= j) {
    if (t == alt) alice++, a[i + 1] += alt, alt = a[++i];
    if (t == bot) bob++, a[j - 1] += bot, bot = a[--j];
    t++;
  }
  cout << alice << ' ' << bob;
}
