#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300002;
int n;
long long int arr[MAXN];
int matriz[2][2];
int main() {
  string S;
  cin >> S;
  n = S.size();
  arr[0] = -1;
  for (int i = 0; i < n; i++) arr[i + 1] = S[i] == 'a' ? 0 : 1;
  long long int r[2] = {0, 0};
  for (int i = 1; i <= n; i++) {
    matriz[arr[i]][i & 1]++;
    r[0] += matriz[arr[i]][(i & 1) ^ 1];
    r[1] += matriz[arr[i]][i & 1];
  }
  cout << r[0] << " " << r[1] << "\n";
  return 0;
}
