#include <bits/stdc++.h>
using namespace std;
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int arr[n + 5];
  for (int i = 1; i <= n; i++) scanf("%d", &arr[i]);
  int pt1 = 1, pt2 = n;
  long long sum1 = arr[pt1], sum2 = arr[pt2];
  long long counter1 = 1, counter2 = 1;
  if (n == 1) {
    cout << 1 << " " << 0 << endl;
    return 0;
  }
  while (pt2 - pt1 > 1) {
    if (sum1 <= sum2) {
      pt1++;
      counter1++;
      sum1 += arr[pt1];
    } else if (sum2 < sum1) {
      pt2--;
      counter2++;
      sum2 += arr[pt2];
    }
  }
  cout << counter1 << " " << counter2 << endl;
  return 0;
}
