#include <bits/stdc++.h>
using namespace std;
int GCD(int a, int b) {
  if (!a) return b;
  return GCD(b % a, a);
}
int main() {
  clock_t startTime = clock();
  ios_base::sync_with_stdio(false);
  string str;
  cin >> str;
  long long odda, oddb, evena, evenb, odd, even;
  odda = oddb = evena = evenb = odd = even = 0;
  for (int i = (0); i < (int)(str.size()); i++) {
    if (i % 2 == 0) {
      if (str[i] == 'a') {
        odda++;
        odd += odda;
        even += evena;
      } else {
        oddb++;
        odd += oddb;
        even += evenb;
      }
    } else {
      if (str[i] == 'a') {
        odd += evena + 1;
        even += odda;
        evena++;
      } else {
        odd += evenb + 1;
        even += oddb;
        evenb++;
      }
    }
  }
  cout << even << " " << odd << "\n";
  clock_t endTime = clock();
  cerr << "\nTime:" << double(endTime - startTime) / CLOCKS_PER_SEC
       << " seconds\n";
  return 0;
}
