#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  string s;
  cin >> s;
  int c[2];
  c[0] = c[1] = 0;
  const int m[] = {2, 1};
  for (int i = 0; i < s.size(); i++) {
    int d = s[i] - '0';
    cout << ((c[d]++ * m[d]) % 4) + 1 << " " << d + 1 << "\n";
  }
  return 0;
}
