#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
const long long int MOD = 1e9 + 7;
const long long int MOD2 = 998244353;
long double PI = 2 * acos(0.0);
template <typename T>
T gcd(T a, T b) {
  return (b == 0) ? a : gcd(b, a % b);
}
template <typename T>
T lcm(T a, T b) {
  return a * (b / gcd(a, b));
}
template <typename T>
T mod_exp(T b, T p, T m) {
  T x = 1;
  while (p) {
    if (p & 1) x = (x * b) % m;
    b = (b * b) % m;
    p = p >> 1;
  }
  return x;
}
template <typename T>
T invFermat(T a, T p) {
  return mod_exp(a, p - 2, p);
}
template <typename T>
T exp(T b, T p) {
  T x = 1;
  while (p) {
    if (p & 1) x = (x * b);
    b = (b * b);
    p = p >> 1;
  }
  return x;
}
string tostring(long long int number) {
  stringstream ss;
  ss << number;
  return ss.str();
}
long long int toint(const string& s) {
  stringstream ss;
  ss << s;
  long long int x;
  ss >> x;
  return x;
}
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
void solve() {
  long long int odds = 0;
  long long int evens = 0;
  string s;
  cin >> s;
  long long int prev_a_odd = 0;
  long long int prev_a_even = 0;
  long long int prev_b_odd = 0;
  long long int prev_b_even = 0;
  for (long long int i = 0; i < s.length(); i++) {
    odds++;
    if (s[i] == 'a') {
      if (i % 2 == 0) {
        odds += prev_a_even;
        evens += prev_a_odd;
        prev_a_even++;
      } else {
        odds += prev_a_odd;
        evens += prev_a_even;
        prev_a_odd++;
      }
    } else {
      if (i % 2 == 0) {
        odds += prev_b_even;
        evens += prev_b_odd;
        prev_b_even++;
      } else {
        odds += prev_b_odd;
        evens += prev_b_even;
        prev_b_odd++;
      }
    }
  }
  cout << evens << " " << odds << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
