#include <bits/stdc++.h>
using namespace std;
char s[100500];
long long cal(int n) { return (long long)n * (n - 1) / 2; }
int main() {
  scanf("%s", s);
  int oa = 0, eb = 0;
  int ob = 0, ea = 0;
  int len = strlen(s);
  for (int i = 0; i < len; i++) {
    if (s[i] == 'a') {
      if (i % 2)
        oa++;
      else
        ea++;
    } else {
      if (i % 2)
        ob++;
      else
        eb++;
    }
  }
  long long even = (long long)oa * ea + (long long)ob * eb;
  long long odd = cal(oa) + cal(ea) + cal(ob) + cal(eb) + len;
  printf("%I64d %I64d\n", even, odd);
  return 0;
}
