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