#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int m, pos = 1, neg = 0, i;
  cin >> m;
  long long int a[m];
  for (i = 0; i < m; i++) {
    cin >> a[i];
    a[i] = (a[i] > 0) ? 1 : -1;
    if (i > 0) a[i] *= a[i - 1];
    if (a[i] == 1)
      pos++;
    else
      neg++;
  }
  cout << pos * neg << " " << m * (m + 1) / 2 - pos * neg << endl;
}
