#include <bits/stdc++.h>
using namespace std;
const int MAX = 20007;
void solve() {
  long long int a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, q, r, t, u, v, w,
      x, y, z;
  cin >> n;
  long long int ar[n];
  for (i = 0; i < n; i++) {
    cin >> ar[i];
  }
  c = d = 0;
  i = 0;
  j = n - 1;
  while (i <= j) {
    bool ans, ans2;
    ans = ans2 = false;
    if (i < j) {
      if (ar[i] < ar[j]) {
        c++;
        ar[j] -= ar[i];
        i++;
        if (ar[i] == ar[j] && i == j) {
          d++;
          i++;
        }
      } else if (ar[i] > ar[j]) {
        ar[i] -= ar[j];
        j--;
        d++;
        if (ar[i] == ar[j] && i == j) {
          c++;
          j--;
        }
      } else if (ar[i] == ar[j]) {
        i++;
        j--;
        c++;
        d++;
      }
    } else if (i == j) {
      c++;
      i++;
    }
  }
  cout << c << " " << d << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int tc;
  int c = 1, i;
  solve();
  return 0;
}
