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