#include <bits/stdc++.h>
using namespace std;
int c1, c2;
string s;
vector<pair<int, int> > hori = {{1, 3}, {2, 3}, {3, 3}, {4, 3}};
vector<pair<int, int> > vert = {{1, 1}, {3, 1}};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> s;
  for (char c : s) {
    if (c == '1') {
      cout << hori[c1].first << ' ' << hori[c1].second << '\n';
      c1 = (c1 + 1) % 4;
    } else {
      cout << vert[c2].first << ' ' << vert[c2].second << '\n';
      c2 = (c2 + 1) % 2;
    }
  }
  return 0;
}
