#include <bits/stdc++.h>
using namespace std;
struct node {
  int a, b, c, d;
};
bool cmp(const node &first, const node &sec) {
  if (first.a != sec.a) return first.a < sec.a;
  return first.b < sec.b;
}
bool operator<(const node &left, const node &right) { return left.b > right.b; }
string str;
long long l, pa, pb, ans[100005][5], anso, anse, add, i;
int main() {
  cin >> str;
  l = str.length();
  pa = l;
  pb = l;
  for (i = l - 1; i >= 0; i--) {
    if (str[i] == 'a') {
      if (pa == l) {
        ans[i][0] = 1;
        ans[i][1] = 0;
      } else {
        add = pa - i;
        if (add % 2 == 0) {
          ans[i][0] = ans[pa][0];
          ans[i][1] = ans[pa][1];
        } else {
          ans[i][0] = ans[pa][1];
          ans[i][1] = ans[pa][0];
        }
        ans[i][0]++;
      }
      pa = i;
    }
  }
  for (i = l - 1; i >= 0; i--) {
    if (str[i] == 'b') {
      if (pb == l) {
        ans[i][0] = 1;
        ans[i][1] = 0;
      } else {
        add = pb - i;
        if (add % 2 == 0) {
          ans[i][0] = ans[pb][0];
          ans[i][1] = ans[pb][1];
        } else {
          ans[i][0] = ans[pb][1];
          ans[i][1] = ans[pb][0];
        }
        ans[i][0]++;
      }
      pb = i;
    }
  }
  for (i = 0; i < l; i++) anso += ans[i][0];
  for (i = 0; i < l; i++) anse += ans[i][1];
  cout << anse << " " << anso;
  return 0;
}
