#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
void solve() {
  string s;
  cin >> s;
  vector<vector<ll>> cnt(2, vector<ll>(2, 0));
  ll e = 0, o = 0;
  for (int i = 0; i < s.size(); i++) {
    o++;
    if (i % 2 == 0) {
      o += cnt[s[i] - 'a'][0];
      e += cnt[s[i] - 'a'][1];
      cnt[s[i] - 'a'][0]++;
    } else {
      e += cnt[s[i] - 'a'][0];
      o += cnt[s[i] - 'a'][1];
      cnt[s[i] - 'a'][1]++;
    }
  }
  cout << e << " " << o << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve();
  }
  return EXIT_SUCCESS;
}
