#include <bits/stdc++.h>
using namespace std;
int Set(int N, int pos) { return N |= (1LL << pos); }
int Reset(int N, int pos) { return N &= ~(1LL << pos); }
bool Check(int N, int pos) { return N & (1LL << pos); }
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1}, dy[] = {1, -1, 0, 0, 1, -1, -1, 1};
inline void cn(long &n) {
  n = 0;
  long ch = getchar();
  int sign = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') sign = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    n = (n << 3) + (n << 1) + ch - '0', ch = getchar();
  n = n * sign;
}
template <class T>
void cmin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
void cmax(T &a, T b) {
  if (b > a) a = b;
}
template <class T>
int len(const T &c) {
  return (int)c.size();
}
template <class T>
int len(char c[]) {
  return (int)strlen(c);
}
long stoi(string s) {
  long n = 0;
  for (int i(0), _n(len(s)); i < _n; ++i) n = n * 10 + (s[i] - 48);
  return n;
}
int main() {
  ios_base::sync_with_stdio(false);
  string s;
  cin >> s;
  long long ae = 0, ao = 0, be = 0, bo = 0;
  for (int i(0), _n(len(s)); i < _n; ++i) {
    if (s[i] == 'a') {
      if ((i % 2) == 0)
        ae++;
      else
        ao++;
    } else {
      if ((i % 2) == 0)
        be++;
      else
        bo++;
    }
  }
  cout << (ae * ao) + (bo * be) << " "
       << (ao * (ao - 1) / 2) + (bo * (bo - 1) / 2) + (ae * (ae - 1) / 2) +
              (be * (be - 1) / 2) + (len(s));
  return 0;
}
