#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
pair<long long, long long> ansa, ansb;
string s;
long long ans[N];
inline void getans(pair<long long, long long> &pa, char c) {
  for (long long i = 0; i < s.length(); ++i) {
    if (s[i] == c) {
      ans[i % 2]++;
      pa.first += ans[i % 2];
      pa.second += ans[(bool)(!(i % 2))];
    }
  }
}
signed main() {
  cin >> s;
  getans(ansa, 'a');
  memset(ans, 0, sizeof ans);
  getans(ansb, 'b');
  cout << ansa.second + ansb.second << ' ' << ansa.first + ansb.first;
  return 0;
}
