#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, a, b, ca = 0, cb = 0;
  a = 0;
  b = 0;
  cin >> n;
  deque<int> choc;
  while (n--) {
    cin >> x;
    choc.push_back(x);
  }
  if (choc.size() == 1) {
    cout << 1 << " " << 0 << endl;
  } else {
    a += choc.front();
    b += choc.back();
    choc.pop_front();
    choc.pop_back();
    ca++;
    cb++;
    while (!choc.empty()) {
      if (a > b) {
        b += choc.back();
        cb++;
        choc.pop_back();
      } else if (a < b) {
        a += choc.front();
        ca++;
        choc.pop_front();
      } else {
        if (choc.size() > 1) {
          a += choc.front();
          b += choc.back();
          choc.pop_back();
          choc.pop_front();
          ca++;
          cb++;
        } else {
          choc.pop_front();
          ca++;
        }
      }
    }
    cout << ca << " " << cb << endl;
  }
}
