#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  long long int even = 0, odd, a_at_even = 0, b_at_even = 0, a_at_odd = 0,
                b_at_odd = 0;
  odd = str.size();
  for (unsigned int i = 0; i < str.size(); i++) {
    if (str[i] == 'a') {
      if (i % 2 == 1) {
        if (a_at_even > 0) odd += a_at_even;
        if (a_at_odd > 0) even += a_at_odd;
        a_at_even++;
      } else {
        if (a_at_even > 0) even += a_at_even;
        if (a_at_odd > 0) odd += a_at_odd;
        a_at_odd++;
      }
    } else {
      if (i % 2 == 1) {
        if (b_at_even > 0) odd += b_at_even;
        if (b_at_odd > 0) even += b_at_odd;
        b_at_even++;
      } else {
        if (b_at_even > 0) even += b_at_even;
        if (b_at_odd > 0) odd += b_at_odd;
        b_at_odd++;
      }
    }
  }
  cout << even << ' ' << odd << '\n';
  return 0;
}
