#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long int n;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long int i = 0;
  long long int j = n - 1;
  long long int sum = a[i];
  long long int sum1 = a[j];
  long long int cnt = 0;
  long long int cnt1 = 0;
  while (i <= j) {
    if (sum > sum1) {
      cnt1++;
      j--;
      sum1 += a[j];
    } else if (sum < sum1) {
      cnt++;
      i++;
      sum += a[i];
    } else if (sum = sum1) {
      if ((i == j)) {
        cnt++;
        i++;
        j--;
      } else {
        cnt1++;
        j--;
        sum1 += a[j];
        cnt++;
        i++;
        sum += a[i];
      }
    }
  }
  cout << cnt << " " << cnt1 << endl;
  return 0;
}
