#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int t[n], sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> t[i];
    sum += t[i];
  }
  int alice = 0, bob = 0, i = 1, j = 1, x = 0, y = n - 1;
  for (int time = 0; time < sum; time++) {
    if (i == t[x]) {
      alice++;
      t[x] = -1;
      x++;
      i = 1;
    } else
      i++;
    if (j == t[y]) {
      bob++;
      t[y] = -1;
      y--;
      j = 1;
    } else
      j++;
  }
  cout << alice << " " << n - alice;
  return 0;
}
