#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  long long n = s.length();
  long long odd = n, even = 0;
  long long odda = 0, oddb = 0;
  long long evena = 0, evenb = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'a') {
      if (i % 2 == 0) {
        odd += evena;
        even += odda;
        evena++;
      } else {
        odd += odda;
        even += evena;
        odda++;
      }
    } else {
      if (i % 2 == 0) {
        odd += evenb;
        even += oddb;
        evenb++;
      } else {
        odd += oddb;
        even += evenb;
        oddb++;
      }
    }
  }
  cout << even << " " << odd;
  return 0;
}
