#include <bits/stdc++.h>
using namespace std;
char in[(100005)];
int N;
long long cnt[2][2];
int main() {
  scanf("%s", in);
  N = strlen(in);
  for (int i = 0; i < N; i++) {
    cnt[in[i] - 'a'][i % 2]++;
  }
  long long ans1 = cnt[0][0] * cnt[0][1] + cnt[1][0] * cnt[1][1];
  long long all = 0;
  long long num_a = 0;
  long long num_b = 0;
  for (int i = 0; i < N; i++) {
    if (in[i] == 'a') {
      all += (cnt[0][0] + cnt[0][1]) - num_a;
      num_a++;
    } else {
      all += (cnt[1][0] + cnt[1][1]) - num_b;
      num_b++;
    }
  }
  cout << ans1 << " " << all - ans1 << endl;
  return 0;
}
