#include <bits/stdc++.h>
int main() {
  int bars, Ctime[100000 + 1];
  bool isthere = false;
  bool done;
  int i, j, k, n;
  int Abars = 0, Bbars = 0;
  int already[100000 + 1];
  scanf("%d", &bars);
  n = bars;
  for (i = 0; i < n; i++) scanf("%d", &Ctime[i]);
  already[0] = 1;
  for (i = 0, j = n - 1; i < n && j >= 0 && !isthere;) {
    done = false;
    if (Ctime[i] > Ctime[j]) {
      Ctime[i] -= Ctime[j];
      j--;
      Bbars++;
      if (already[j] == 0) already[j] = 2;
      done = true;
    } else if (Ctime[i] < Ctime[j]) {
      Abars++;
      Ctime[j] -= Ctime[i];
      i++;
      if (already[i] == 0) already[i] = 1;
      done = true;
    }
    if (Ctime[i] == Ctime[j] && i == j - 2) {
      isthere = true;
      done = true;
      Abars += 2;
      Bbars++;
    } else if (Ctime[i] == Ctime[j] && i != j) {
      Abars++;
      Bbars++;
      i++;
      j--;
      done = true;
      if (already[i] == 0) already[i] = 1;
      if (already[j] == 0) already[j] = 2;
    }
    if (!done) {
      if (i == j && already[i] == 1)
        Abars++;
      else
        Bbars++;
    }
    if ((Abars + Bbars) == bars) isthere = true;
  }
  printf("%d %d\n", Abars, Bbars);
}
