#include <bits/stdc++.h>
using namespace std;
char s[100005];
int cnta[2];
int cntb[2];
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  scanf("%s", s + 1);
  long long int odd = 0, even = 0;
  for (int i = 1; s[i]; i++) {
    if (s[i] == 'a')
      cnta[(i & 1)]++, odd += cnta[(i & 1)], even += cnta[1 ^ (i & 1)];
    else
      cntb[(i & 1)]++, odd += cntb[(i & 1)], even += cntb[1 ^ (i & 1)];
  }
  cout << even << " " << odd;
  return 0;
}
