#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(0);
  string s;
  while (cin >> s) {
    int n = ((int)(s).size());
    vector<int> a0, a1, b0, b1;
    for (int i = 0; i < n; ++i) {
      if (s[i] == 'a') {
        if (i & 1)
          a1.push_back(i);
        else
          a0.push_back(i);
      } else {
        if (i & 1)
          b1.push_back(i);
        else
          b0.push_back(i);
      }
    }
    long long ans0 = 0, ans1 = 0;
    for (int i = 0; i < n; ++i) {
      if (s[i] == 'a') {
        if (!(i & 1)) {
          ans0 += a1.end() - lower_bound(a1.begin(), a1.end(), i);
          ans1 += a0.end() - lower_bound(a0.begin(), a0.end(), i);
        } else {
          ans1 += a1.end() - lower_bound(a1.begin(), a1.end(), i);
          ans0 += a0.end() - lower_bound(a0.begin(), a0.end(), i);
        }
      } else {
        if (!(i & 1)) {
          ans0 += b1.end() - lower_bound(b1.begin(), b1.end(), i);
          ans1 += b0.end() - lower_bound(b0.begin(), b0.end(), i);
        } else {
          ans1 += b1.end() - lower_bound(b1.begin(), b1.end(), i);
          ans0 += b0.end() - lower_bound(b0.begin(), b0.end(), i);
        }
      }
    }
    cout << ans0 << " " << ans1 << '\n';
  }
}
