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