#include <bits/stdc++.h>
using namespace std;
vector<long long int> adj[100001];
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int power(long long int x, long long int y, long long int p) {
  long long int ans = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) ans = (ans * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return ans;
}
bool chk(long long int x, long long int y) {
  long long int c = x;
  long long int sum = 0;
  while (x > 0) {
    long long int o = min(y, x);
    sum += o;
    x -= o;
    x -= (x / 10);
  }
  if (sum * 2 >= c)
    return true;
  else
    return false;
}
int fact(int n);
int nCr(int n, int r) { return fact(n) / (fact(r) * fact(n - r)); }
int fact(int n) {
  int res = 1;
  for (int i = 2; i <= n; i++) res = res * i;
  return res;
}
void solve() {
  long long int q, mx = 0, sum = 0, left = 0, right = 0;
  long long int i, j, n, k, cnt = 0;
  long long int d, b, s, m;
  cin >> n;
  vector<long long int> v(n);
  for (i = 0; i < n; i++) cin >> v[i];
  i = -1, j = n;
  long long int al = 0, bob = 0;
  k = 0, s = 0;
  long long int al1 = 0, bob1 = 0;
  while (j > i + 1) {
    if (al <= bob) {
      i++;
      al += v[i];
      al1++;
    } else {
      j--;
      bob += v[j];
      bob1++;
    }
  }
  cout << al1 << " " << bob1;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int tt = 1.0 * clock();
  int t;
  t = 1;
  for (int y = 0; y < t; y++) {
    solve();
  }
  return 0;
}
