#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string str;
  cin >> str;
  long long int l = str.size();
  long long int ct1 = 0, ct2 = 0;
  long long int even = 0, odd = 0;
  for (long long int i = 0; i < l; i++) {
    if (str[i] == 'a') {
      if (i % 2 == 0)
        ct1++;
      else
        ct2++;
    }
  }
  even += ct1 * ct2;
  odd += (ct1 * (ct1 - 1)) / 2;
  odd += (ct2 * (ct2 - 1)) / 2;
  odd += ct1 + ct2;
  ct1 = 0, ct2 = 0;
  for (long long int i = 0; i < l; i++)
    if (str[i] == 'b') {
      if (i % 2 == 0)
        ct1++;
      else
        ct2++;
    }
  even += ct1 * ct2;
  odd += (ct1 * (ct1 - 1)) / 2;
  odd += (ct2 * (ct2 - 1)) / 2;
  odd += ct1 + ct2;
  cout << even << " " << odd;
  return 0;
}
