#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long num1 = 0;
  long long num2 = 0;
  string s;
  cin >> s;
  long long n = s.length();
  for (long long i = 0, _n = (n); i < _n; i++) {
    if (s[i] == '0') {
      cout << "1 " << num1 % 4 + 1 << endl;
      num1++;
    } else {
      cout << "3 " << num2 % 4 + 1 << endl;
      num2 += 2;
    }
  }
}
