#include <bits/stdc++.h>
using namespace std;
long long PA[100000 + 5], PB[100000 + 5], IA[100000 + 5], IB[100000 + 5];
int main() {
  string s;
  cin >> s;
  int sz = s.size();
  long long par = 0, imp = 0;
  for (int i = sz - 1; i >= 0; i--) {
    IA[i] = IA[i + 1];
    IB[i] = IB[i + 1];
    PA[i] = PA[i + 1];
    PB[i] = PB[i + 1];
    if (s[i] == 'a') {
      if (i & 1)
        IA[i]++;
      else
        PA[i]++;
    } else {
      if (i & 1)
        IB[i]++;
      else
        PB[i]++;
    }
  }
  for (int i = 0; i < sz; ++i) {
    if (i & 1) {
      if (s[i] == 'a')
        par += PA[i];
      else
        par += PB[i];
    } else {
      if (s[i] == 'a')
        par += IA[i];
      else
        par += IB[i];
    }
  }
  for (int i = 0; i < sz; ++i) {
    if (i & 1) {
      if (s[i] == 'a')
        imp += IA[i];
      else
        imp += IB[i];
    } else {
      if (s[i] == 'a')
        imp += PA[i];
      else
        imp += PB[i];
    }
  }
  cout << par << " " << imp << endl;
}
