#include <bits/stdc++.h>
using namespace std;
int n, t[100001], ans1, ans2, sum1, sum2;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> t[i];
  int i = 1, j = n;
  while (true) {
    if (j < i) break;
    if (sum1 <= sum2) {
      ans1++;
      sum1 += t[i++];
    } else {
      ans2++;
      sum2 += t[j--];
    }
  }
  cout << ans1 << " " << ans2 << endl;
  return 0;
}
