#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
int dpA[MAXN][2], dpB[MAXN][2];
int main() {
  string s;
  cin >> s;
  long long odd = 0, even = 0;
  int n = s.size(), first = n;
  for (int i = 0; i < n; i++)
    if (s[i] == 'a') {
      first = i;
      break;
    }
  for (int i = first; i < n; i++)
    if (s[i] == 'a') dpA[first][(i - first) % 2]++;
  int lastA = first;
  for (int i = first; i < n; i++)
    if (s[i] == 'a') {
      if (i != first) {
        if ((i - lastA) % 2) {
          dpA[i][0] = dpA[lastA][1];
          dpA[i][1] = dpA[lastA][0] - 1;
        } else {
          dpA[i][0] = dpA[lastA][0] - 1;
          dpA[i][1] = dpA[lastA][1];
        }
      }
      even += dpA[i][1];
      odd += dpA[i][0];
      lastA = i;
    }
  first = n;
  for (int i = 0; i < n; i++)
    if (s[i] == 'b') {
      first = i;
      break;
    }
  for (int i = first; i < n; i++)
    if (s[i] == 'b') dpB[first][(i - first) % 2]++;
  int lastB = first;
  for (int i = first; i < n; i++)
    if (s[i] == 'b') {
      if (i != first) {
        if ((i - lastB) % 2) {
          dpB[i][0] = dpB[lastB][1];
          dpB[i][1] = dpB[lastB][0] - 1;
        } else {
          dpB[i][0] = dpB[lastB][0] - 1;
          dpB[i][1] = dpB[lastB][1];
        }
      }
      even += dpB[i][1];
      odd += dpB[i][0];
      lastB = i;
    }
  cout << even << " " << odd;
}
