#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  while (cin >> n) {
    int t[100011];
    for (int i = 1; i <= n; ++i) cin >> t[i];
    int suma = 0, sumb = 0;
    int l = 1, r = n;
    int alice = 0, bob = 0;
    while (l <= r) {
      if (suma > sumb) {
        sumb += t[r];
        r--;
        bob++;
      } else {
        suma += t[l];
        l++;
        alice++;
      }
    }
    cout << alice << " " << bob << '\n';
  }
}
