#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 10;
int n;
int bj[5][5];
char ch[maxn];
int main() {
  scanf("%s", ch + 1);
  n = strlen(ch + 1);
  int now = 0;
  for (int i = 1; i <= n; i++) {
    if (ch[i] == '0') {
      if (bj[1][1])
        bj[1][1] = 0, printf("3 1\n");
      else
        bj[1][1] = 1, printf("1 1\n");
    } else {
      if (now == 3)
        now = 0, printf("4 2\n");
      else
        printf("%d 2\n", ++now);
    }
  }
  return 0;
}
