#include <bits/stdc++.h>
using namespace std;
long long countEvenSum(long long arr[], long long n) {
  long long temp[2] = {1, 0};
  long long result = 0, sum = 0;
  for (int i = 0; i <= n - 1; i++) {
    sum = ((sum + arr[i]) % 2 + 2) % 2;
    temp[sum]++;
  }
  result = result + (temp[0] * (temp[0] - 1) / 2);
  result = result + (temp[1] * (temp[1] - 1) / 2);
  return (result);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  t = 1;
  while (t--) {
    long long n;
    cin >> n;
    long long arr[n];
    long long z = 0;
    long long a[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      if (arr[i] < 0) {
        a[z++] = 1;
      } else
        a[z++] = 0;
    }
    long long ans = countEvenSum(a, n);
    cout << n * (n + 1) / 2 - ans << " " << ans << "\n";
  }
}
