#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000009;
const int MOD = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    v.push_back(t);
  }
  int p1 = 0, p2 = n - 1;
  int girl = 0;
  int boy = 0;
  int herCandy = 0;
  int hisCandy = 0;
  for (int time = 0; p1 <= p2 && time <= 100000000; time++) {
    if (time == girl + v[p1]) {
      girl += v[p1];
      herCandy++;
      p1++;
    }
    if (p2 != p1 - 1 && time == boy + v[p2]) {
      boy += v[p2];
      hisCandy++;
      p2--;
    }
  }
  cout << herCandy << " " << hisCandy << endl;
  return 0;
}
