#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int grand(int x) { return uniform_int_distribution<int>(0, x - 1)(rng); }
const int maxn = 1e6 + 7;
const long long inf = 1e9 + 7;
const long long mod = 1e9 + 7;
long long gcd(long long x, long long y) {
  if (x < y) return gcd(y, x);
  if (y == 0) return x;
  return gcd(y, x % y);
}
int main() {
  {
    ios ::sync_with_stdio(false);
    cin.tie(0);
  };
  string s;
  cin >> s;
  int ch = 3, cv = 4;
  for (int j = 0; j < s.size(); j++) {
    char c = s[j];
    if (c == '1') {
      ch += 2;
      if (ch >= 4) ch = 1;
      cout << 1 << " " << ch << "\n";
    } else {
      cv++;
      if (cv > 4) cv = 1;
      cout << 3 << " " << cv << "\n";
    }
  }
}
