#include <bits/stdc++.h>
using namespace std;
long long n, p, k, b, c, i, j, x, y, z = 1, m = 0;
long long a[100000] = {}, yy[100000] = {};
string s;
pair<int, int> pp[100000];
vector<long long> v;
char cc[100000][10];
int main() {
  cin >> s;
  b = s.size();
  for (i = 0; i < b - 1; i++) {
    cout << i << " " << z << "\n";
    if (m == 1) {
      m = 0;
      z++;
      z++;
      continue;
    }
    if (s[i] == s[i + 1]) {
      m = 1;
      i++;
      continue;
    }
    m = 0;
    z++;
  }
  if (m == 1 && i == b - 1) z++;
  cout << z;
  return 0;
}
