#include <bits/stdc++.h>
using namespace std;
char s[100001];
long long c[2][2], e = 0, o = 0;
int i, p, q;
int main() {
  cin >> s;
  for (i = 0; s[i]; i++) {
    p = s[i] - 'a';
    q = i % 2;
    c[p][q]++;
    e += c[p][!q];
    o += c[p][q];
  }
  cout << e << " " << o;
  return 0;
}
