#include <bits/stdc++.h>
using namespace std;
int main() {
  int C = 0, R = 0;
  char s[1005];
  scanf("%s", &s);
  for (int i = 0; s[i]; i++) {
    if (s[i] == '1') {
      cout << R + 1 << " 1\n";
      R = (R + 1) % 4;
    } else {
      cout << C + 1 << " 4\n";
      C = (C == 0) ? 2 : 0;
    }
  }
}
