#include <bits/stdc++.h>
using namespace std;
const long long inf = 1000000000000000000LL;
const double EPS = 1e-9;
const long long mod = 1000000007ll;
const int maxn = (int)1000 + 10;
int main() {
  char a[100500];
  scanf("%s", a);
  int cntOdd[2] = {}, cntEven[2] = {};
  long long oddRet = 0, evenRet = 0;
  int n = strlen(a);
  for (int i = 0; i < n; i++) {
    oddRet++;
    int t = a[i] - 'a';
    if (i % 2) {
      evenRet += cntOdd[t];
      oddRet += cntEven[t];
      cntEven[t]++;
    } else {
      oddRet += cntOdd[t];
      evenRet += cntEven[t];
      cntOdd[t]++;
    }
  }
  printf("%lld %lld", evenRet, oddRet);
}
