#include <bits/stdc++.h>
using namespace std;
char s[int(1e5 + 1)];
long long n, even, odd, a[2], b[2];
int main() {
  gets(s);
  n = strlen(s);
  for (int i = 1; i <= n; i += 2) odd += n - i + 1;
  for (int i = 2; i <= n; i += 2) even += n - i + 1;
  for (int i = 0; i < n; i++) {
    swap(a[0], a[1]);
    swap(b[0], b[1]);
    if (s[i] == 'a') {
      even -= b[0];
      odd -= b[1];
    } else {
      even -= a[0];
      odd -= a[1];
    }
    if (s[i] == 'a')
      a[1]++;
    else
      b[1]++;
  }
  printf("%I64d %I64d", even, odd);
  return 0;
}
