#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << 1 << ' ' << 0;
    return 0;
  }
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int x1 = 0;
  int s1 = 0;
  int s2 = 0;
  int x2 = n - 1;
  int l;
  while (x1 < x2) {
    if (a[x1] < a[x2]) {
      a[x2] -= a[x1];
      s1++;
      x1++;
      l = 2;
      continue;
    }
    if (a[x1] == a[x2]) {
      x1++;
      x2--;
      s1++;
      s2++;
      l = 1;
      continue;
    }
    if (a[x1] > a[x2]) {
      a[x1] -= a[x2];
      s2++;
      x2--;
      l = 1;
      continue;
    }
  }
  if (x1 == x2) {
    if (l == 1) {
      s1++;
    } else {
      s2++;
    }
  }
  cout << s1 << ' ' << s2;
}
