#include <bits/stdc++.h>
using namespace std;
bool mysort(pair<pair<int, int>, int> const a,
            pair<pair<int, int>, int> const b) {
  return (a.first.second < b.first.second);
}
int main() {
  clock_t begin = clock();
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  s = "." + s;
  long long evena = 0, evenb = 0, odda = 0, oddb = 0;
  long long ansodd = 0, anseven = 0;
  for (int i = 1; i < s.size(); i++) {
    if (i % 2 == 0) {
      if (s[i] == 'a') {
        ansodd += evena;
        ansodd++;
        evena++;
        anseven += odda;
      } else {
        ansodd += evenb;
        ansodd++;
        evenb++;
        anseven += oddb;
      }
    } else {
      if (s[i] == 'a') {
        anseven += evena;
        ansodd += odda;
        ansodd++;
        odda++;
      } else {
        anseven += evenb;
        ansodd += oddb;
        ansodd++;
        oddb++;
      }
    }
  }
  cout << anseven << " " << ansodd << endl;
  return 0;
}
