#include <bits/stdc++.h>
using namespace std;
char buf[100000 + 10];
int main(void) {
  scanf("%s", buf);
  long long resOdd = 0;
  long long resEven = 0;
  long long dp[2][2] = {};
  for (int i = 0; buf[i]; ++i) {
    dp[i % 2][buf[i] - 'a']++;
    resOdd += dp[i % 2][buf[i] - 'a'];
    resEven += dp[i % 2 ^ 1][buf[i] - 'a'];
  }
  cout << resEven << " " << resOdd << endl;
  return 0;
}
