#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long n, tot, a[2], b[2];
string st;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> st;
  n = st.size();
  st = ' ' + st;
  long long odd, even;
  odd = even = 0;
  for (long long i = 1; i <= n; ++i) {
    long long id = i & 1;
    if (st[i] == 'a') {
      even += a[id ^ 1];
      a[id]++;
      odd += a[id];
    } else {
      even += b[id ^ 1];
      b[id]++;
      odd += b[id];
    }
  }
  cout << even << ' ' << odd << endl;
  return 0;
}
