#include <bits/stdc++.h>
using namespace std;
typedef short int int16;
typedef unsigned short int uint16;
typedef long int int32;
typedef unsigned long int uint32;
typedef long long int int64;
typedef unsigned long long int uint64;
typedef float float32;
typedef double float64;
typedef long double float96;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int64 tttt;
  if (!false)
    tttt = 1;
  else
    cin >> tttt;
  while (tttt--) {
    int64 n;
    cin >> n;
    vector<int64> ar(n);
    int64 summ = 0;
    for (int64 i = (0); i < (n); i += (1)) {
      cin >> ar[i];
      summ += ar[i];
    }
    int64 a = 0, b = n - 1, ta = 0, tb = 0;
    while (a < b) {
      if (ta <= tb && a < b) {
        ta += ar[a];
        a++;
      } else {
        tb += ar[b];
        b--;
      }
    }
    if (ta <= tb)
      a++;
    else
      b--;
    cout << a << " " << (n - 1 - b) << endl;
  }
  return 0;
}
