#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, bar;
  vector<int> choco;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> bar;
    choco.push_back(bar);
  }
  if (n == 1)
    cout << "1 0\n";
  else {
    auto l = choco.begin();
    auto r = choco.end() - 1;
    int diff = 0;
    int l_count = 0;
    int r_count = 0;
    while (true) {
      if ((l + 1) == r) {
        ++l_count;
        ++r_count;
        break;
      }
      diff = (*l) - (*r);
      if (diff < 0) {
        (*r) -= (*l);
        ++l_count;
        ++l;
      } else if (diff > 0) {
        (*l) -= (*r);
        ++r_count;
        --r;
      } else {
        ++l_count;
        (*l) = 0;
        if ((l + 2) == r)
          ++l;
        else {
          ++r_count;
          (*r) = 0;
          ++l;
          --r;
        }
      }
    }
    cout << l_count << ' ' << r_count << '\n';
  }
  return 0;
}
