#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long long ans[2] = {}, c[2][2] = {};
  for (int i = 0; i < s.length(); i++) {
    c[s[i] - 'a'][i & 1]++;
    ans[0] += c[s[i] - 'a'][1 - (i & 1)];
    ans[1] += c[s[i] - 'a'][i & 1];
  }
  printf("%I64d %I64d\n", ans[0], ans[1]);
  return 0;
}
