#include <bits/stdc++.h>
using namespace std;
long long A[2], B[2];
long long comb(long long x) { return ((x + 1LL) * x) / 2LL; }
int main() {
  string S;
  cin >> S;
  long long odd = 0, even = 0;
  for (int i = 0; i < S.size(); i++) {
    if (S[i] == 'a')
      A[i % 2]++;
    else
      B[i % 2]++;
  }
  odd = comb(B[0]) + comb(B[1]) + comb(A[0]) + comb(A[1]);
  even = B[0] * B[1] + A[0] * A[1];
  cout << even << ' ' << odd;
}
