#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10, MOD = 1e9 + 7;
long long int resodd, reseven, cnta[2], cntb[2];
char s[N];
int main() {
  scanf("%s", &s);
  int sz = strlen(s);
  for (int i = 0; i < sz; i++) {
    if (s[i] == 'a') {
      cnta[i % 2]++;
      resodd += cnta[i % 2];
      reseven += cnta[(i + 1) % 2];
    } else {
      cntb[i % 2]++;
      resodd += cntb[i % 2];
      reseven += cntb[(i + 1) % 2];
    }
  }
  cout << reseven << " " << resodd;
  return 0;
}
