#include <bits/stdc++.h>
using namespace std;
const int NMAX = 100000 + 5;
const int MMAX = 2000 + 5;
const int INF = 1000000000;
const int BS = 1000000000 + 7;
const long long INFLL = 1000000000ll * 1000000000ll;
const long double eps = 1e-6;
int main(int argc, char** argv) {
  if (argc > 1 && strcmp(argv[1], "seland") == 0) {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  }
  ios::sync_with_stdio(false);
  cin.tie();
  cout.tie();
  long long ans[2] = {0};
  int cnt[2][2] = {0};
  string s;
  int index = 0;
  cin >> s;
  for (auto c : s) {
    c -= 'a';
    cnt[c][index % 2]++;
    ans[0] += cnt[c][(index + 1) % 2];
    ans[1] += cnt[c][index % 2];
    index++;
  }
  cout << ans[0] << " " << ans[1] << endl;
  return 0;
}
