#include <bits/stdc++.h>
using namespace std;
long long count_odd(long long n) {
  int g = n - n / 2;
  return g * (n - g - 1) + 2 * g;
}
long long count_even(long long n) {
  int g = n / 2;
  return g * (n - g);
}
int main() {
  string str;
  cin >> str;
  vector<int> lens;
  lens.push_back(1);
  for (int i = 1; i < str.size(); i++) {
    if (str[i] == str[i - 1])
      lens[lens.size() - 1]++;
    else {
      lens.push_back(1);
    }
  }
  long long odds, evens;
  odds = evens = 0;
  for (int i = 0; i < lens.size(); i++) {
    evens += count_even(lens[i]);
    odds += count_odd(lens[i]);
  }
  long long g_odds, g_evens, f_odds, f_evens;
  g_odds = g_evens = f_odds = f_evens = 0;
  bool o = lens[1] % 2;
  int xx = lens[1];
  for (int i = 2; i < lens.size(); i += 2) {
    if (xx & 1) {
      f_evens += (lens[i] - lens[i] / 2);
      f_odds += (lens[i] / 2);
    } else {
      f_evens += (lens[i] / 2);
      f_odds += (lens[i] - lens[i] / 2);
    }
    xx += lens[i] + lens[i + 1];
  }
  xx = lens[2];
  for (int i = 3; i < lens.size(); i += 2) {
    if (xx & 1) {
      g_evens += (lens[i] - lens[i] / 2);
      g_odds += (lens[i] / 2);
    } else {
      g_evens += (lens[i] / 2);
      g_odds += (lens[i] - lens[i] / 2);
    }
    xx += lens[i] + lens[i + 1];
  }
  odds += f_odds * (lens[0] / 2) + f_evens * (lens[0] - lens[0] / 2);
  evens += f_evens * (lens[0] / 2) + f_odds * (lens[0] - lens[0] / 2);
  long long t;
  xx = lens[1];
  for (int i = 2; i < lens.size(); i += 2) {
    if (lens[i - 1] & 1) {
      f_evens -= (lens[i] - lens[i] / 2);
      f_odds -= (lens[i] / 2);
    } else {
      f_evens -= (lens[i] / 2);
      f_odds -= (lens[i] - lens[i] / 2);
    }
    if ((lens[i - 1] + lens[i]) & 1) {
      t = f_odds;
      f_odds = f_evens;
      f_evens = t;
    }
    odds += f_odds * (lens[i] / 2) + f_evens * ((lens[i] + 1) / 2);
    evens += f_evens * (lens[i] / 2) + f_odds * ((lens[i] + 1) / 2);
  }
  odds += g_odds * (lens[1] / 2) + g_evens * ((lens[1] + 1) / 2);
  evens += g_evens * (lens[1] / 2) + g_odds * ((lens[1] + 1) / 2);
  for (int i = 3; i < lens.size(); i += 2) {
    if (lens[i - 1] & 1) {
      g_evens -= (lens[i] - lens[i] / 2);
      g_odds -= (lens[i] / 2);
    } else {
      g_evens -= (lens[i] / 2);
      g_odds -= (lens[i] - lens[i] / 2);
    }
    if ((lens[i - 1] + lens[i]) & 1) {
      t = g_odds;
      g_odds = g_evens;
      g_evens = t;
    }
    odds += g_odds * (lens[i] / 2) + g_evens * ((lens[i] + 1) / 2);
    evens += g_evens * (lens[i] / 2) + g_odds * ((lens[i] + 1) / 2);
  }
  cout << evens << ' ' << odds;
}
