#include <bits/stdc++.h>
using namespace std;
int pos_line, pos_column;
string s;
void vertical() {
  cout << 1 << " " << pos_line + 1 << "\n";
  pos_line++;
}
void orizontal() {
  cout << 3 << " " << pos_column + 1 << "\n";
  pos_column += 2;
}
void verify() {
  if (pos_line == 4) pos_line = 0;
  if (pos_column == 4) pos_column = 0;
}
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0')
      vertical();
    else
      orizontal();
    verify();
  }
  return 0;
}
