#include <bits/stdc++.h>
using namespace std;
const int MAX = 100005;
const int INF = 999999999;
int main() {
  string s;
  cin >> s;
  long long even = 0, odd = 0;
  long long count_e[2], count_o[2];
  count_e[0] = 0;
  count_e[1] = 0;
  count_o[0] = 0;
  count_o[1] = 0;
  for (int i = 0; i < s.size(); i++) {
    odd++;
    int id = s[i] - 'a';
    if (i % 2 == 0) {
      odd += count_e[id];
      even += count_o[id];
      count_e[id]++;
    } else {
      odd += count_o[id];
      even += count_e[id];
      count_o[id]++;
    }
  }
  cout << even << " " << odd << endl;
  return 0;
}
