#include <bits/stdc++.h>
using namespace std;
int n, t[100010];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> t[i];
  int sum = accumulate(t + 1, t + n + 1, 0);
  int cur = 0;
  int i = 1;
  for (i = 1; i <= n; i++) {
    cur += t[i];
    if (cur > sum - cur) break;
  }
  if (sum - cur < cur - t[i]) i--;
  cout << i << " " << n - i << endl;
}
