#include <bits/stdc++.h>
const double eps = 1e-7, PI = 3.1415926;
const long long N = 1e6 + 10;
using namespace std;
long long n, q, m, k, x, y, a[N], mx = -1, mn = 1e9, sum1, sum2, sum3, sum4,
                                  anse, anso;
string s, s1, s2;
map<long long, long long> mp;
vector<long long> vec;
int32_t main() {
  cin >> s;
  n = s.size();
  for (long long i = 0; i < n; i++) {
    if (i % 2) {
      if (s[i] == 'a')
        sum1++;
      else
        sum2++;
    } else {
      if (s[i] == 'a')
        sum3++;
      else
        sum4++;
    }
  }
  anso = n + sum1 * (sum1 - 1) / 2 + sum2 * (sum2 - 1) / 2 +
         sum3 * (sum3 - 1) / 2 + sum4 * (sum4 - 1) / 2;
  anse = sum1 * sum3 + sum2 * sum4;
  cout << anse << " " << anso;
  return 0;
}
