#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  long long int a[2][2], ans[2], temp;
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 2; j++) a[i][j] = 0;
    ans[i] = 0;
  }
  cin >> s;
  n = s.length();
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 2; j++) {
      temp = a[j][0];
      a[j][0] = a[j][1];
      a[j][1] = temp;
    }
    int p = (s[i] - 'a');
    a[p][1]++;
    ans[0] += (a[p][0]);
    ans[1] += (a[p][1]);
  }
  cout << ans[0] << " " << ans[1] << "\n";
  return 0;
}
