#include <bits/stdc++.h>
using namespace std;
int n, i, k, k1, k2, alic, bob;
int main() {
  deque<int> d;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> k;
    d.push_front(k);
  }
  if (d.size() == 1) {
    cout << "1"
         << " "
         << "0";
    return 0;
  }
  while (true) {
    if (d.front() - d.back() > 0) {
      if (d.size() == 2) {
        bob++;
        alic++;
        break;
      } else {
        k1 = d.front() - d.back();
        d.pop_back();
        d.pop_front();
        d.push_front(k1);
        alic++;
      }
    }
    if (d.back() - d.front() > 0) {
      if (d.size() == 2) {
        bob++;
        alic++;
        break;
      } else {
        k1 = d.back() - d.front();
        d.pop_back();
        d.pop_front();
        d.push_back(k1);
        bob++;
      }
    }
    if (d.back() - d.front() == 0) {
      if (d.size() == 2) {
        bob++;
        alic++;
        break;
      } else if (d.size() == 3) {
        alic += 2;
        bob++;
        break;
      } else {
        d.pop_front();
        d.pop_back();
        alic++;
        bob++;
      }
    }
  }
  cout << alic << " " << bob;
}
