#include <bits/stdc++.h>
using namespace std;
string str;
long long calcu(long long x) { return x * (x - 1) / 2; }
int main() {
  while (cin >> str) {
    long long odda = 0, oddb = 0, evena = 0, evenb = 0;
    for (int i = 0; i < str.length(); i++) {
      if (str[i] == 'a') {
        if (i & 1)
          evena++;
        else
          odda++;
      } else {
        if (i & 1)
          evenb++;
        else
          oddb++;
      }
    }
    long long Odd = evena * odda + evenb * oddb;
    long long Even =
        str.length() + calcu(evena) + calcu(oddb) + calcu(odda) + calcu(evenb);
    cout << Odd << " " << Even << endl;
  }
  return 0;
}
