#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  int a[n], sum = 0, in = 0, a1[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum = sum + a[i];
    a1[i] = sum;
  }
  if (n == 1) {
    cout << 1 << " " << 0 << endl;
    exit(0);
  } else if (n == 2) {
    cout << 1 << " " << 1 << endl;
    exit(0);
  } else {
    int b, c, x = a[0], y = sum - x, d;
    if (x >= y) {
      cout << 1 << " " << n - 1 << endl;
      exit(0);
    }
    for (int i = 1; i < n; i++) {
      b = a1[i - 1];
      d = a[i];
      c = sum - b - d;
      if (b == c) {
        cout << i + 1 << " " << n - i - 1 << endl;
        exit(0);
      } else if (b > c) {
        cout << i << " " << n - i << endl;
        exit(0);
      } else {
        int bb = b + d;
        int cc = sum - bb;
        if (bb > cc) {
          cout << i + 1 << " " << n - i - 1 << endl;
          exit(0);
        }
      }
    }
  }
  return 0;
}
