#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  long long c[2][2] = {0};
  cin >> s;
  for (int i = 1; i <= s.size(); i++) c[i % 2][s[i - 1] - 'a']++;
  long long res1 = c[0][1] + c[1][1] + (c[0][1] * (c[0][1] - 1)) / 2 +
                   (c[1][1] * (c[1][1] - 1)) / 2 + c[0][0] + c[1][0] +
                   (c[0][0] * (c[0][0] - 1)) / 2 +
                   (c[1][0] * (c[1][0] - 1)) / 2;
  long long res2 = c[0][1] * c[1][1] + c[1][0] * c[0][0];
  cout << res2 << " " << res1 << endl;
}
