#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int a[n];
  long long int b[n];
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  long long int j = n - 1;
  long long int i = 0;
  long long int x = 0, y = 0;
  while (j >= i) {
    if (i == j && a[i] == b[j]) {
      x++;
      break;
    }
    long long int mi = min(a[i], b[j]);
    a[i] -= mi;
    b[j] -= mi;
    if (a[i] == 0) {
      x++;
      i++;
    }
    if (b[j] == 0) {
      y++;
      j--;
    }
  }
  cout << x << " " << y << "\n";
  return 0;
}
