#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string s;
  cin >> s;
  long long A[2] = {0}, B[2] = {0};
  long long evenLen = 0LL, oddLen = 0LL;
  for (int i = 0; i < s.size(); i++) {
    oddLen++;
    if (s[i] == 'a') {
      if (i % 2 == 0) {
        evenLen += A[1];
        oddLen += A[0];
        A[0]++;
      } else {
        evenLen += A[0];
        oddLen += A[1];
        A[1]++;
      }
    } else {
      if (i % 2 == 0) {
        evenLen += B[1];
        oddLen += B[0];
        B[0]++;
      } else {
        evenLen += B[0];
        oddLen += B[1];
        B[1]++;
      }
    }
  }
  cout << evenLen << " " << oddLen << endl;
  return 0;
}
