#include <bits/stdc++.h>
using namespace std;
int n;
char s[100009];
pair<long long, long long> solve(char a) {
  long long ca = 0;
  long long ta = 0;
  long long csa = 0;
  long long tsa = 0;
  for (int i = 1; i <= n; i++) {
    if (i % 2 == 0)
      ca += s[i] == a;
    else
      ta += s[i] == a;
    if (i % 2 == 0 && s[i] == a) csa += ca, tsa += ta;
    if (i % 2 == 1 && s[i] == a) csa += ta, tsa += ca;
  }
  return make_pair(csa, tsa);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> s + 1;
  n = strlen(s + 1);
  pair<long long, long long> a = solve('a');
  pair<long long, long long> b = solve('b');
  cout << a.second + b.second << " " << a.first + b.first << endl;
  return 0;
}
