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