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