#include <bits/stdc++.h>
using namespace std;
bool in[5][5];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  string s;
  cin >> s;
  for (auto& c : s) {
    bool ok = 0;
    if (c == '1') {
      if (in[0][0] == 0) {
        cout << "1 1\n";
        in[0][0] = 1;
        ok = 1;
      }
    } else if (in[4][4] == 0) {
      cout << "3 4\n";
      in[4][4] = 1;
      ok = 1;
    }
    if (ok == 0) {
      if (c == '1') {
        cout << "1 3\n";
        in[0][0] = 0;
      } else {
        cout << "1 4\n";
        in[4][4] = 0;
      }
    }
  }
}
