#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long long odd_a = 0;
  long long odd_b = 0;
  long long ans_odd = 0;
  long long even_a = 0;
  long long even_b = 0;
  long long ans_even = 0;
  for (long long i = 0; i < s.size(); ++i) {
    if (s[i] == 'a') {
      if (i % 2 == 0) {
        even_a++;
        ans_odd += even_a;
        ans_even += odd_a;
      } else {
        odd_a++;
        ans_even += even_a;
        ans_odd += odd_a;
      }
    } else {
      if (i % 2 == 0) {
        even_b++;
        ans_odd += even_b;
        ans_even += odd_b;
      } else {
        odd_b++;
        ans_even += even_b;
        ans_odd += odd_b;
      }
    }
  }
  cout << ans_even << " " << ans_odd << endl;
  return 0;
}
