#define _CRT_SECURE_NO_WARNINGS
#define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING
#include <bits/stdc++.h>
using namespace std;
int a[4][4];
char seq[1010];
auto find_place(int kind)
{
    if (kind == 0)
    {
        for (int i = 0; i < 3; i++)
            for (int j = 0; j < 4; j++)
                if (a[i][j] == 0 && a[i + 1][j] == 0)
                {
                    a[i][j] = a[i + 1][j] = 1;
                    return make_pair(i, j);
                }
    }
    else
    {
        for (int i = 0; i < 4; i++)
            for (int j = 0; j < 3; j++)
                if (a[i][j] == 0 && a[i][j + 1] == 0)
                {
                    a[i][j] = a[i][j + 1] = 1;
                    return make_pair(i, j);
                }
    }
}
void reduce_space()
{
    for (int i = 0; i < 4; i++)
    {
        int cnt = 0;
        for (int j = 0; j < 4; j++)
            cnt += a[i][j];
        if (cnt == 4)
            for (int j = 0; j < 4; j++)
                a[i][j] = 0;
    }
    for (int i = 0; i < 4; i++)
    {
        int cnt = 0;
        for (int j = 0; j < 4; j++)
            cnt += a[j][i];
        if (cnt == 4)
            for (int j = 0; j < 4; j++)
                a[j][i] = 0;
    }
}
auto find_place2(int kind)
{
    if (kind == 0) //|
    {
        if (a[0][0] == 1)
        {
            a[2][0] = a[3][0] = 1;
            return make_pair(2, 0);
        }
        else
        {
            a[0][0] = a[1][0] = 1;
            return make_pair(0, 0);
        }
    }
    else //-
    {
        for (int i = 0; i < 4; i++)
        {
            if (a[i][2] == 0 && a[i][3] == 0)
            {
                a[i][2] = a[i][3] = 1;
                return make_pair(i, 2);
            }
        }
    }
}
int main()
{
    scanf("%s", seq);
    int len = strlen(seq);
    for (int i = 0; i < len; i++)
    {
        auto ans = find_place2(seq[i] - '0');
        reduce_space();
        printf("%d %d\n", ans.first + 1, ans.second + 1);
    }
    return 0;
}
