#include <bits/stdc++.h>
using namespace std;
int main() {
  const int N = 100050;
  int n, m, t[N], tA = 0, tB = 0;
  cin >> n;
  m = n / 2;
  long long A = 0, B = 0;
  for (int i = 0; i < n; i++) {
    cin >> t[i];
    if (i < m) {
      A += t[i];
      tA++;
    } else {
      B += t[i];
      tB++;
    }
  }
  while (true) {
    if (A == B) break;
    if (A > B) {
      if ((A - t[tA - 1]) > B) {
        A -= t[tA - 1];
        tB++;
        B += t[tA - 1];
        tA--;
      } else
        break;
    }
    if (B > A) {
      if ((B - t[n - tB]) >= A) {
        B -= t[n - tB];
        tA++;
        A += t[n - tB];
        tB--;
      } else
        break;
    }
  }
  cout << tA << "  " << tB;
  return 0;
}
