import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.string;

void main ()
{
	string s;
	while ((s = readln.strip) != "")
	{
		bool have0 = false;
		bool have1 = false;
		foreach (ref c; s)
		{
			if (c == '0')
			{
				writeln (have0 ? 1 : 3, " ", 1);
				have0 ^= true;
			}
			else
			{
				writeln (1, " ", have1 ? 1 : 3);
				have1 ^= true;
			}
		}
	}
}
