#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, ct = 0;
  cin >> n;
  long long a[n + 1], all;
  all = n * (n + 1) / 2;
  for (long long i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  long long neg[n + 1];
  memset(neg, 0, sizeof(neg));
  for (long long i = 1; i <= n; ++i) {
    if (a[i] < 0)
      neg[i] = neg[i - 1] + 1;
    else
      neg[i] = neg[i - 1];
  }
  long long even = 0, odd = 0;
  for (int i = 0; i <= n; ++i) {
    if (neg[i] % 2 == 0)
      even++;
    else
      odd++;
  }
  ct = even * odd;
  cout << ct << ' ' << all - ct;
}
