#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[1000005];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = 0;
  }
  int x = 0, y = 0;
  int i = 0, j = n - 1;
  while (i <= j && i < n) {
    if (i == j) {
      if (a[i].second == 0) x += 1;
      i++;
      j--;
    }
    if (a[i].first == a[j].first) {
      a[i].first = 0;
      a[j].first = 0;
      if (a[i].second == 0) {
        x++;
        a[i].second = 1;
      }
      if (a[j].second == 0) {
        y++;
        a[j].second = 2;
      }
      i++;
      j--;
    } else if (a[i].first < a[j].first) {
      if (a[i].second == 0) {
        x++;
        a[i].second = 1;
      }
      if (a[j].second == 0) {
        y++;
        a[j].second = 2;
      }
      a[j].first -= a[i].first;
      a[i].first = 0;
      i++;
    } else if (a[i].first > a[j].first) {
      if (a[i].second == 0) {
        x++;
        a[i].second = 1;
      }
      if (a[j].second == 0) {
        y++;
        a[j].second = 2;
      }
      a[i].first -= a[j].first;
      a[j].first = 0;
      j--;
    }
  }
  if (n == 1) x = 1, y = 0;
  if (n == 2) x = 1, y = 1;
  cout << x << " " << y;
}
