#include <bits/stdc++.h>
using namespace std;
string A;
long long fa[100050], fb[100050], odd = 1, s1 = 1, s2, all = 1;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> A;
  fa[1] = 1;
  for (int i = 1; i < A.size(); ++i) {
    if (A[i] == A[0]) {
      ++s1;
      all += s1;
      fa[i + 1] = fa[i - 1] + 1;
      fb[i + 1] = fb[i - 1];
      odd += fa[i + 1];
    } else {
      ++s2;
      all += s2;
      fb[i + 1] = fb[i - 1] + 1;
      odd += fb[i + 1];
      fa[i + 1] = fa[i - 1];
    }
  }
  cout << (all - odd) << " " << odd;
  return 0;
}
