#include <bits/stdc++.h>
using namespace std;
const int N = 111111;
const int INF = int(1e9), mod = INF + 7;
char s[N];
int cnt[2][2];
pair<long long, long long> res;
int main() {
  scanf("%s", s);
  int n = strlen(s);
  for (int(i) = (0); i < (n); ++(i)) {
    int x = s[i] - 'a', y = i & 1;
    cnt[x][y]++;
    res.second += cnt[x][1 - y];
    res.first += cnt[x][y];
  }
  printf("%I64d %I64d\n", res.second, res.first);
  return 0;
}
