#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  string s;
  cin >> s;
  int n = s.length();
  long long even = 0, odd = 0, ea = 0, eb = 0, oa = 0, ob = 0;
  for (int i = 0; i < n; i++) {
    if (i & 1) {
      if (s[i] == 'a') {
        oa++;
        odd += oa;
        even += ea;
      } else {
        ob++;
        odd += ob;
        even += eb;
      }
    } else {
      if (s[i] == 'a') {
        ea++;
        odd += ea;
        even += oa;
      } else {
        eb++;
        odd += eb;
        even += ob;
      }
    }
  }
  cout << even << ' ' << odd << '\n';
  return 0;
}
