#include <bits/stdc++.h>
using namespace std;
string s;
long long int a[2];
long long int b[2];
int main() {
  cin >> s;
  int n = s.size();
  long long int odd = 0;
  long long int even = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'a') {
      odd++;
      odd += a[1];
      even += a[0];
      a[1]++;
    } else {
      odd++;
      odd += b[1];
      even += b[0];
      b[1]++;
    }
    swap(a[0], a[1]);
    swap(b[0], b[1]);
  }
  cout << even << " " << odd;
  return 0;
}
