#include <bits/stdc++.h>
using namespace std;
vector<long long> a;
vector<long long> b;
string s;
void te() {
  cin >> s;
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == 'a') a.push_back(i + 1);
    if (s[i] == 'b') b.push_back(i + 1);
  }
  long long aeven = 0, aodd = 0;
  long long aEven = 0, aOdd = 0;
  for (long long i = 0; i < a.size(); i++) {
    aodd++;
    if (a[i] % 2 == 0) {
      aeven += aOdd;
      aodd += aEven;
      aEven++;
    } else {
      aeven += aEven;
      aodd += aOdd;
      aOdd++;
    }
  }
  long long beven = 0, bodd = 0;
  long long bEven = 0, bOdd = 0;
  for (long long i = 0; i < b.size(); i++) {
    bodd++;
    if (b[i] % 2 == 0) {
      beven += bOdd;
      bodd += bEven;
      bEven++;
    } else {
      beven += bEven;
      bodd += bOdd;
      bOdd++;
    }
  }
  cout << (aeven + beven) << " " << (aodd + bodd) << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  te();
  return 0;
}
