#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  ios_base::sync_with_stdio(false), cin.tie(0);
  cin >> n;
  vector<int> time(n);
  for (int i = 0; i < n; i++) {
    cin >> time[i];
  }
  int a = 0, b = n - 1;
  while (b - a > 1) {
    if (time[a] <= time[b]) {
      time[b] -= time[a];
      a++;
    } else {
      time[a] -= time[b];
      b--;
    }
  }
  cout << a + 1 << " " << n - a - 1 << "\n";
  return 0;
}
