#include <bits/stdc++.h>
using namespace std;
long long int od[2], ev[2], res1, res2;
string s;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  for (int i = 0; i <= s.length() - 1; ++i) {
    if (i % 2) {
      od[s[i] - 'a']++;
      res1 += od[s[i] - 'a'];
      res2 += ev[s[i] - 'a'];
    } else {
      ev[s[i] - 'a']++;
      res1 += ev[s[i] - 'a'];
      res2 += od[s[i] - 'a'];
    }
  }
  cout << res2 << " " << res1;
}
