#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int odd[2], even[2];
char ch[100100];
int main() {
  while (~scanf("%s", ch)) {
    memset(odd, 0, sizeof(odd));
    memset(even, 0, sizeof(even));
    int len = strlen(ch);
    long long sum_odd = 0, sum_even = 0;
    for (int i = 0; i < len; i++) {
      char str = ch[i] - 'a';
      if ((i + 1) % 2) {
        odd[str]++;
        sum_odd += odd[str];
        sum_even += even[str];
      } else {
        even[str]++;
        sum_odd += even[str];
        sum_even += odd[str];
      }
    }
    printf("%lld %lld\n", sum_even, sum_odd);
  }
  return 0;
}
