#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9 + 2;
const int maxn = 2e5 + 10;
const int maxq = 1e3 + 10;
const int alf = 26;
const int dlm = 1e9 + 7;
const long long mod = 998244353;
string O[] = {"YES", "NO", "Yes", "No"};
int chb[maxn];
int k[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> chb[i];
  int l = 1, r = n;
  int al = 0, ar = 0;
  int sl = 0, sr = 0;
  while (l <= r) {
    if (sl > sr) {
      sr += chb[r];
      r--;
      ar++;
    } else {
      sl += chb[l];
      l++;
      al++;
    }
  }
  cout << al << " " << ar;
}
