#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000000000")
using namespace std;
const long long int INF = 2e9 + 1;
int main() {
  string s;
  cin >> s;
  int n = s.length();
  long long int cnt[2][2] = {{0, 0}, {0, 0}};
  for (int(i) = 0; (i) < (n); (i)++) {
    cnt[s[i] == 'b'][i & 1]++;
  }
  long long int a = 0, b = 0;
  for (int(i) = 0; (i) < (n); (i)++) {
    int fid = (s[i] == 'b');
    int sid = (i & 1);
    a += cnt[fid][1 - sid];
    b += cnt[fid][sid]--;
  }
  cout << a << " " << b;
}
