#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int t[n];
  for (int i = 0; i < n; i++) cin >> t[i];
  int tA = 0, cntA = 0;
  int tB = 0, cntB = 0;
  int l = 0, r = n - 1;
  while (l <= r) {
    if (tA <= tB) {
      tA += t[l];
      cntA++;
      l++;
    } else {
      tB += t[r];
      cntB++;
      r--;
    }
  }
  cout << cntA << " " << cntB << endl;
  return 0;
}
