#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(false);
  int n;
  int totSum, prefixSum = 0;
  cin >> n;
  vector<int> vec(n);
  for (int i = 0; i < n; i++) {
    int elem;
    cin >> elem;
    vec[i] = elem;
    totSum += elem;
  }
  totSum = accumulate(vec.begin(), vec.end(), 0);
  int i = 0;
  while (i < n and prefixSum < totSum) {
    prefixSum += vec[i];
    totSum -= vec[i];
    i++;
  }
  if (i != 0 and totSum < prefixSum - vec[i - 1]) {
    i--;
  }
  cout << i << " " << n - i;
  return 0;
}
