#include <bits/stdc++.h>
using namespace std;
long long e[2], o[2], even, odd;
int main() {
  string s;
  cin >> s;
  int len = s.size();
  for (int i = 0; i < len; i++) {
    if (i & 1)
      o[s[i] - 'a']++;
    else
      e[s[i] - 'a']++;
    if (i & 1)
      even += o[s[i] - 'a'], odd += e[s[i] - 'a'];
    else
      even += e[s[i] - 'a'], odd += o[s[i] - 'a'];
  }
  cout << odd << " " << even;
  return 0;
}
