#include <bits/stdc++.h>
using namespace std;
const int inf = ~0U >> 1;
const int N = 100005;
int d[N];
int main() {
  int n;
  cin >> n;
  int sum = 0;
  for (int i = 1; i <= n; i++) cin >> d[i], sum += d[i];
  if (n == 1)
    cout << "1 0" << endl;
  else if (n == 2)
    cout << "1 1" << endl;
  else {
    int a = 1, b = 1;
    int l = 1, r = n;
    for (int i = 1; i <= sum; i++) {
      d[l]--, d[r]--;
      if (l + 1 == r - 1 && d[l] == 0 && d[r] == 0) {
        a++;
        break;
      }
      if (d[l] == 0) {
        if (l + 1 == r)
          break;
        else
          a++, l++;
      }
      if (d[r] == 0) {
        if (l == r - 1)
          break;
        else
          b++, r--;
      }
    }
    cout << a << " " << b << endl;
  }
  return 0;
}
