#include <bits/stdc++.h>
using namespace std;
string s;
int i, x, y;
int main() {
  for (cin >> s; i < s.length(); i++) {
    if (s[i] == '0') {
      cout << "1 " << x + 1 << endl;
      x = (x + 1) % 4;
    } else {
      cout << "4 " << y + 1 << endl;
      y = (y + 2) % 4;
    }
  }
}
