#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[100005];
  scanf("%s", s);
  int n = strlen(s);
  int K = 1;
  while (K < n) K *= 2;
  K *= 2;
  int na = 0;
  int nb = 0;
  int a[2];
  int b[2];
  for (int i = (0); i < (2); ++i) a[i] = b[i] = 0;
  for (int i = (0); i < (n); ++i) {
    if (s[i] == 'a') {
      a[i % 2]++;
      na++;
    }
    if (s[i] == 'b') {
      b[i % 2]++;
      nb++;
    }
  }
  long long int res1 = a[0] * 1LL * a[0] + a[1] * 1LL * a[1] +
                       b[0] * 1LL * b[0] + b[1] * 1LL * b[1] + na + nb;
  long long int res2 = a[1] * 1LL * a[0] + b[0] * 1LL * b[1];
  printf("%I64d %I64d\n", res2, res1 / 2);
  return 0;
}
