#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long long oddans = 0, evenans = 0;
  int odda = 0, evena = 0, oddb = 0, evenb = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'a') {
      if (i & 1) {
        evenans += evena;
        oddans += odda;
        oddans++;
        odda++;
      } else {
        evenans += odda;
        oddans += evena;
        oddans++;
        evena++;
      }
    }
    if (s[i] == 'b') {
      if (i & 1) {
        evenans += evenb;
        oddans += oddb;
        oddans++;
        oddb++;
      } else {
        evenans += oddb;
        oddans += evenb;
        oddans++;
        evenb++;
      }
    }
  }
  cout << evenans << " " << oddans << endl;
}
