#include <bits/stdc++.h>
using namespace std;
int main() {
  pair<int, int> place[][4] = {{{1, 1}, {1, 2}, {1, 3}, {1, 4}},
                               {{3, 1}, {3, 3}, {4, 1}, {4, 3}}};
  string s;
  cin >> s;
  int ind[2] = {0};
  for (auto &c : s) {
    int v = (c - '0');
    auto out = place[v][ind[v]];
    ind[v] = (ind[v] + 1) % 4;
    cout << out.first << ' ' << out.second << '\n';
  }
}
