#include <bits/stdc++.h>
using namespace std;
const int maxN = 100000 + 10;
int a[maxN];
int lef[maxN];
int rig[maxN];
bool dp[maxN];
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  ;
  if (n == 2) {
    cout << "1 1";
    return 0;
  }
  rig[n] = a[n];
  lef[1] = a[1];
  for (int i = 2; i <= n; i++) lef[i] = lef[i - 1] + a[i];
  for (int i = (n - 1); i >= 1; i--) rig[i] = rig[i + 1] + a[i];
  for (int i = (n - 1); i >= 2; i--) {
    if (lef[i - 1] <= rig[i + 1]) {
      dp[i] = true;
    } else {
      dp[i] = false;
    }
  }
  bool flag = false;
  for (int i = n; i >= 1; i--) {
    if (dp[i] == true) {
      cout << i << " " << n - i << endl;
      flag = true;
      break;
    }
  }
  if (!flag) cout << 1 << " " << n - 1;
  int _;
  cin >> _;
  return 0;
}
