#include <bits/stdc++.h>
using namespace std;
int mat[5][5];
void solve() {
  string s;
  cin >> s;
  for (int(i) = 0; (i) < int((s).size()); (i)++) {
    if (s[i] == '0') {
      if (mat[1][4] == 1) {
        mat[1][4] = 0;
        cout << 3 << " " << 4 << endl;
      } else {
        mat[1][4] = 1;
        cout << 1 << " " << 4 << endl;
      }
    } else {
      if (mat[1][1] == 0) {
        mat[1][1] = 1;
        cout << 1 << " " << 1 << endl;
      } else if (mat[2][1] == 0) {
        mat[2][1] = 1;
        cout << 2 << " " << 1 << endl;
      } else if (mat[3][1] == 0) {
        mat[3][1] = 1;
        cout << 3 << " " << 1 << endl;
      } else {
        mat[1][1] = mat[2][1] = mat[3][1] = 0;
        cout << 4 << " " << 1 << endl;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int test = 1, kickstart = 0;
  for (int i = 1; i <= test; i++) {
    if (kickstart) {
      cout << "Case #" << i << ": ", solve(), cout << endl;
    } else
      solve();
  }
  return 0;
}
