#include <bits/stdc++.h>
using namespace std;
int ar[100005], br[100005];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> ar[i];
  int l = 0, r = n - 1, a = 0;
  br[r] = 2;
  br[l] = 1;
  while (l < r) {
    if (ar[l] < ar[r]) {
      ar[r] -= ar[l];
      l++;
      if (!br[l]) br[l] = 1;
    } else if (ar[l] > ar[r]) {
      ar[l] -= ar[r];
      a++;
      r--;
      if (!br[r]) br[r] = 2;
    } else {
      l++, r--;
      br[r] = 2;
      br[l] = 1;
      a++;
    }
  }
  if (l == r) {
    if (br[l] == 1)
      l++;
    else
      a++;
  }
  cout << l << " " << a << endl;
  return 0;
}
