#include <bits/stdc++.h>
using namespace std;
const long long MAX = 123456789;
const long long inf = 123456789000000000;
const double EPS = 1e-10;
const double PI = 2 * asin(1.0);
const long long mod = 1e9 + 7;
inline int cmp(double x, double y = 0, double tol = EPS) {
  return (x <= y + tol) ? (x + tol < y) ? -1 : 0 : 1;
}
int main() {
  string s;
  cin >> s;
  long long par, impar, ap, ai, bp, bi;
  par = impar = ap = ai = bp = bi = 0LL;
  for (int i = 0; i < ((int)s.size()); ++i) {
    impar++;
    if (i % 2 == 0) {
      if (s[i] == 'a') {
        par += ai;
        impar += ap;
        ap++;
      } else {
        par += bi;
        impar += bp;
        bp++;
      }
    } else {
      if (s[i] == 'a') {
        par += ap;
        impar += ai;
        ai++;
      } else {
        par += bp;
        impar += bi;
        bi++;
      }
    }
  }
  cout << par << " " << impar << endl;
}
