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