#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  int lo = 0;
  int hi = n - 1;
  int s1 = 0, s2 = 0, t1 = v[0], t2 = v[n - 1];
  while (lo <= hi) {
    if (lo == hi) {
      if (t1 <= t2) {
        s1++;
      } else
        s2++;
      lo++;
    } else {
      int t = min(t1, t2);
      t1 -= t;
      t2 -= t;
      if (t1 == 0) {
        s1++;
        lo++;
        t1 = v[lo];
      }
      if (t2 == 0) {
        s2++;
        hi--;
        t2 = v[hi];
      }
    }
  }
  cout << s1 << " " << s2 << '\n';
  return 0;
}
