#include <bits/stdc++.h>
using namespace std;
int n, ans;
long long t[100100];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> t[i];
  int lo = 0;
  int hi = n;
  int a = 0;
  int b = 0;
  while (lo < hi) {
    while (lo < hi && a <= b) a += t[lo++];
    while (lo < hi && b < a) b += t[--hi];
  }
  cout << lo << " " << n - lo;
  return 0;
}
