#include <bits/stdc++.h>
using namespace std;
signed main() {
  deque<int> de;
  int num, a = 0, b = 0, t, totala = 0, totalb = 0;
  cin >> num;
  for (int i = 0; i < num; i++) {
    cin >> t;
    de.push_back(t);
  }
  a += de.front();
  de.pop_front();
  totala++;
  while (!de.empty()) {
    if (b >= a) {
      a += de.front();
      de.pop_front();
      totala++;
    } else {
      b += de.back();
      de.pop_back();
      totalb++;
    }
  }
  cout << totala << " " << totalb << endl;
  return 0;
}
