#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 1e2;
int val[maxn];
int ltime[maxn];
int rtime[maxn];
long long res = 0;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> val[i];
  }
  int l = 0, r = n - 1;
  int ltaken = 0, rtaken = 0;
  int ltime = 0;
  int rtime = 0;
  while (l <= r) {
    if (ltime == rtime) {
      ltaken++;
      ltime += val[l];
      l++;
    } else if (ltime > rtime) {
      rtaken++;
      rtime += val[r];
      r--;
    } else if (ltime < rtime) {
      ltaken++;
      ltime += val[l];
      l++;
    }
  }
  cout << ltaken << ' ' << rtaken << endl;
}
