#include <bits/stdc++.h>
using namespace std;
int main(int argc, char **argv) {
  char s[100010];
  scanf("%s", s + 1);
  int evena = 0, evenb = 0, odda = 0, oddb = 0;
  long long even = 0, odd = 0;
  for (int i = 1; i <= (int)strlen(s + 1); i++) {
    if (i % 2 == 0) {
      if (s[i] == 'a') {
        even += odda;
        odd += evena;
        evena++;
      } else {
        even += oddb;
        odd += evenb;
        evenb++;
      }
    } else {
      if (s[i] == 'a') {
        even += evena;
        odd += odda;
        odda++;
      } else {
        even += evenb;
        odd += oddb;
        oddb++;
      }
    }
  }
  cout << even << " " << odd + strlen(s + 1) << endl;
  return 0;
}
