#include <bits/stdc++.h>
using namespace std;
int ncr(int n, int r) {
  int ret = 1;
  for (int i = 1; i <= n - r; i++) {
    ret = (ret * (n - r + i)) / i;
  }
  return ret;
}
int main() {
  int n;
  cin >> n;
  int x;
  long long pos = 0;
  long long neg = 0;
  long long prod = 1;
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    if (x < 0) {
      prod = (prod + 1) & 1;
    }
    if (prod) {
      pos++;
    } else {
      neg++;
    }
  }
  cout << neg * pos + neg << ' ';
  cout << (neg * (neg - 1)) / 2 + (pos * (pos - 1)) / 2 + pos << endl;
  return 0;
}
