import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, std.bitmanip;

void main() {
    auto S = readln.chomp;
    auto N = S.length.to!int;

    int v_count = 0;
    int h_count = 0;

    foreach (s; S) {
        if (s == '1') {
            writeln(1, " ", h_count + 1);
            h_count += 2;
            if (h_count == 4) h_count = 0;
        } else {
            writeln(3, " ", v_count + 1);
            v_count += 1;
            if (v_count == 4) v_count = 0;
        }
    }
}
