#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
char buf[1010];
void Solve() {
  int i, j, k, n, m;
  scanf("%s", (buf));
  int v = 0;
  int h = 0;
  for (i = 0; buf[i]; i++) {
    if (buf[i] == '0') {
      printf("1 %d\n", v + 1);
      v = (v + 1) % 4;
    } else {
      printf("3 %d\n", h * 2 + 1);
      h = (h + 1) % 2;
    }
  }
}
int main() {
  Solve();
  return 0;
}
