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