#include <bits/stdc++.h>
using namespace std;
bool is[1000001 + 1];
long long int g1(long long int x, long long int y) {
  long long int res = 1;
  x = x;
  while (y > 0) {
    if (y & 1) res = (res * x);
    y = y >> 1;
    x = (x * x);
  }
  return res;
}
long long int g(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int GCD(long long int A, long long int B) {
  if (B == 0) {
    return A;
  } else {
    return GCD(B, A % B);
  }
}
long long int isMultipleOf3(long long int n) {
  long long int odd_count = 0;
  long long int even_count = 0;
  if (n < 0) n = -n;
  if (n == 0) return 1;
  if (n == 1) return 0;
  while (n) {
    if (n & 1) odd_count++;
    n = n >> 1;
    if (n & 1) even_count++;
    n = n >> 1;
  }
  return isMultipleOf3(abs(odd_count - even_count));
}
int main() {
  long long int n, x, m = 0, t, a = 0, b = 0, f = 0;
  string s, str;
  set<int> v;
  cin >> s;
  long long int c = 0;
  n = s.length();
  long long int row = 1;
  long long int col = 1;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '1') {
      cout << "3"
           << " " << col << "\n";
      col += 2;
      if (col > 4) col = 1;
    } else {
      cout << "1"
           << " " << row++ << "\n";
      if (row == 5) row = 1;
    }
  }
}
