#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int l = s.length();
  long long int odda = 0, evena = 0, oddb = 0, evenb = 0, oddl = 0, evenl = 0;
  for (int i = 0; i < l; i++) {
    if (i % 2 == 0) {
      if (s[i] == 'a') {
        evena++;
        oddl += evena;
        evenl += odda;
      } else {
        evenb++;
        oddl += evenb;
        evenl += oddb;
      }
    } else {
      if (s[i] == 'a') {
        odda++;
        oddl += odda;
        evenl += evena;
      } else {
        oddb++;
        oddl += oddb;
        evenl += evenb;
      }
    }
  }
  cout << evenl << " " << oddl;
  return 0;
}
