#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n;
  cin >> n;
  if (n == 1) {
    cout << 1 << " " << 0 << "\n";
    return 0;
  } else if (n == 2) {
    cout << 1 << " " << 1 << "\n";
    return 0;
  }
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int lsum = a[0], rsum = a[n - 1];
  int i = 0, j = n - 1;
  bool ok = false;
  while (j - i > 2) {
    if (lsum > rsum) {
      j--;
      rsum += a[j];
    } else if (lsum < rsum) {
      i++;
      lsum += a[i];
    } else {
      i++;
      j--;
      lsum += a[i];
      rsum += a[j];
      if ((j - i) < 2) {
        ok = true;
        break;
      }
    }
  }
  if (lsum > rsum)
    cout << i + 1 << " " << (n - i - 1) << "\n";
  else if (rsum > lsum)
    cout << i + 2 << " " << (n - i - 2) << "\n";
  else {
    if (ok)
      cout << i + 1 << " " << (n - i - 1) << "\n";
    else
      cout << i + 2 << " " << (n - i - 2) << "\n";
  }
  return 0;
}
