#include <bits/stdc++.h>
using namespace std;
string s;
int v, h;
vector<pair<int, int> > ver, hor;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> s;
  ver = {{1, 1}, {1, 2}, {1, 3}, {1, 4}};
  hor = {{3, 1}, {3, 3}, {4, 1}, {4, 3}};
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == '0') {
      cout << ver[v].first << " " << ver[v].second << "\n";
      ++v;
      v %= 4;
    } else {
      cout << hor[h].first << " " << hor[h].second << "\n";
      ++h;
      h %= 4;
    }
  }
}
