#include <bits/stdc++.h>
using namespace std;
short int PD[1024][(1 << 16)];
char s[1024];
int n;
int x[1024], y[1024];
inline bool vazio(int bm, int i, int j) {
  int p = i * 4 + j;
  return ((bm >> p) & 1) == 0;
}
inline void enche(int &bm, int i, int j) {
  int p = i * 4 + j;
  bm |= (1 << p);
}
inline void esvazia(int &bm, int i, int j) {
  int p = i * 4 + j;
  bm &= (~(1 << p));
}
inline void valida(int &bm) {
  int obm = bm;
  for (int i = 0; i < 4; i++)
    if (!vazio(obm, i, 0) and !vazio(obm, i, 1) and !vazio(obm, i, 2) and
        !vazio(obm, i, 3)) {
      esvazia(bm, i, 0);
      esvazia(bm, i, 1);
      esvazia(bm, i, 2);
      esvazia(bm, i, 3);
    }
  for (int j = 0; j < 4; j++)
    if (!vazio(obm, 0, j) and !vazio(obm, 1, j) and !vazio(obm, 2, j) and
        !vazio(obm, 3, j)) {
      esvazia(bm, 0, j);
      esvazia(bm, 1, j);
      esvazia(bm, 2, j);
      esvazia(bm, 3, j);
    }
}
bool calc(int u, int bm) {
  if (u == n) return true;
  short int &pd = PD[u][bm];
  if (pd != -1) return (pd == 1 ? true : false);
  if (s[u] == '0') {
    for (int i = 0; i < 3; i++)
      for (int j = 0; j < 4; j++)
        if (vazio(bm, i, j) and vazio(bm, i + 1, j)) {
          int nbm = bm;
          enche(nbm, i, j);
          enche(nbm, i + 1, j);
          valida(nbm);
          if (calc(u + 1, nbm)) {
            x[u] = i;
            y[u] = j;
            pd = 1;
            return true;
          }
        }
  } else {
    for (int i = 0; i < 4; i++)
      for (int j = 0; j < 3; j++)
        if (vazio(bm, i, j) and vazio(bm, i, j + 1)) {
          int nbm = bm;
          enche(nbm, i, j);
          enche(nbm, i, j + 1);
          valida(nbm);
          if (calc(u + 1, nbm)) {
            x[u] = i;
            y[u] = j;
            pd = 1;
            return true;
          }
        }
  }
  pd = 0;
  return false;
}
int main() {
  scanf("%s", s);
  n = strlen(s);
  memset(PD, 0xff, sizeof(PD));
  calc(0, 0);
  for (int i = 0; i < n; i++) printf("%d %d\n", x[i] + 1, y[i] + 1);
  return 0;
}
