#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
const long long LLINF = 9223372036854775807LL;
int main() {
  string s;
  cin >> s;
  int hpos = 0;
  int vpos = 0;
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == '0') {
      printf("%d %d\n", 3, vpos + 1);
      vpos = (vpos + 1) % 4;
    } else {
      printf("%d %d\n", 1, hpos + 1);
      hpos = (hpos + 2) % 4;
    }
  }
  return 0;
}
