#include <bits/stdc++.h>
using namespace std;
const int MaxN = 1500 + 17;
const int INF = 1e9 + 17;
long long a, b;
string second;
void calc(char x) {
  int n = 0, m = 0, B = 1, Sum = 0;
  for (int i = 0; i < second.size(); ++i) {
    if (second[i] == x) {
      if (i % 2 == 0)
        a += n, m++;
      else
        a += m, n++;
    }
  }
  b += 1ll * (n + 1) * n / 2;
  b += 1ll * (m + 1) * m / 2;
}
int main() {
  cin >> second;
  calc('a');
  calc('b');
  cout << a << ' ' << b << "\n";
  return 0;
}
