#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const double PI = acos(-1.0);
const long long int mod = 1e9 + 7;
const int MAXN = 1e6 + 5;
void cp() {
  string s;
  cin >> s;
  long long int even = 0, odd = 0;
  vector<vector<int>> cnt(2, vector<int>(2, 0));
  for (char x : s) {
    cnt[x - 'a'][0]++;
    odd += cnt[x - 'a'][0];
    even += cnt[x - 'a'][1];
    swap(cnt[0][0], cnt[0][1]);
    swap(cnt[1][0], cnt[1][1]);
  }
  cout << even << " " << odd << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t;
  t = 1;
  while (t--) {
    cp();
  }
  return 0;
}
