#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  vector<int> a;
  vector<int> b;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'a')
      a.push_back(i);
    else
      b.push_back(i);
  }
  long long e = 0, o = 0;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] % 2 == 0) {
      e++;
    } else {
      o++;
    }
  }
  long long odd = 0, even = 0;
  odd += o * (o + 1) / 2 + e * (e + 1) / 2;
  even += o * e;
  o = 0;
  e = 0;
  for (int i = 0; i < b.size(); i++) {
    if (b[i] % 2 == 0) {
      e++;
    } else {
      o++;
    }
  }
  odd += o * (o + 1) / 2 + e * (e + 1) / 2;
  even += o * e;
  cout << even << " " << odd << endl;
}
