#include <bits/stdc++.h>
using namespace std;
const long long nmax = 1e5 + 5;
long long dp[nmax][2];
int main() {
  string t;
  cin >> t;
  vector<long long> arr;
  for (long long i = 0; i < t.size(); ++i) {
    if (i == 0 || t[i] != t[i - 1])
      arr.push_back(1);
    else
      arr[arr.size() - 1]++;
  }
  long long n = arr.size();
  long long sum[2][2] = {};
  long long ans[2] = {};
  for (long long i = 0; i < n; ++i) {
    long long useeven = (arr[i]) / 2 + sum[i % 2][arr[i] % 2];
    long long useodd = (arr[i] + 1) / 2 + sum[i % 2][(arr[i] + 1) % 2];
    long long ceven = arr[i] / 2, codd = (arr[i] + 1) / 2;
    long long cur[2] = {};
    cur[0] = ceven * sum[i % 2][0] + codd * sum[i % 2][1];
    cur[1] = codd * sum[i % 2][0] + ceven * sum[i % 2][1];
    for (long long j = 1; j <= arr[i]; ++j) cur[j % 2] += arr[i] - j + 1;
    ans[0] += cur[0];
    ans[1] += cur[1];
    sum[i % 2][0] = useeven;
    sum[i % 2][1] = useodd;
    if (arr[i] % 2 == 1) {
      swap(sum[(i + 1) % 2][0], sum[(i + 1) % 2][1]);
    }
  }
  cout << ans[0] << ' ' << ans[1] << '\n';
}
