#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  pair<long long, long long> v[4] = {make_pair(1, 1), make_pair(1, 2),
                                     make_pair(1, 3), make_pair(1, 4)};
  pair<long long, long long> h[4] = {make_pair(4, 1), make_pair(4, 3)};
  long long i = 0, j = 0;
  for (auto x : s) {
    if (x == '0') {
      cout << v[i].first << " " << v[i].second << '\n';
      i = (i += 1) % 4;
    } else if (x == '1') {
      cout << h[j].first << " " << h[j].second << '\n';
      j = (j += 1) % 2;
    }
  }
  return 0;
}
