import java.util.*;
import java.io.*;

public class main{

	static FastReader in = new FastReader();
	static PrintWriter out = new PrintWriter(System.out);
	static int N = (int)1e5+5;
	static int n,m,p;

	public static String removeDuplicates(String s) {
    if (s.isEmpty()) {
        return s;
    }
    char[] buf = s.toCharArray();
    char lastchar = buf[0];

    // i: index of input char
    // o: index of output char
    int o = 1;
    for (int i = 1; i < buf.length; i++) {
        if (o > 0 && buf[i] == buf[o - 1]) {
            lastchar = buf[o - 1];
            int c = 1;
            while (o > 0 && buf[o - 1] == lastchar) {
                o--;
                c++;
            }
            if(c%2!=0){
            	o++;
            }
        } else if (buf[i] == lastchar) {
        	if(i+1<buf.length && buf[i+1]==lastchar){}
        	else o++;
            // Don't copy to output
        } else {
            buf[o++] = buf[i];
        }
    }
    return new String(buf, 0, o);
}

	static void solve(){
		char[] a = in.next().toCharArray();
		int[][] b = new int[5][5];
		for(int i1=0;i1<a.length;i1++){

			if(a[i1]=='0'){
				for(int j=1;j<4;j++){
					for(int k=1;k<=4;k++)
						if(b[j][k]==0 && b[j+1][k]==0){
							b[j][k] = 1;
							b[j+1][k] = 1;
							out.println(j+" "+k);
							k =5;
							j = 5;
						}
				}
			}
			else{
				// out.println("bcv "+i1);
				for(int j=1;j<=4;j++){
					for(int k=1;k<4;k++)
						if(b[j][k]==0 && b[j][k+1]==0){
							b[j][k] = 1;
							b[j][k+1] = 1;
							out.println(j+" "+k);
							k =5;
							j = 5;
						}
				}
			}
			// for(int i=1;i<=4;i++)
			// 	for(int j=1;j<=4;j++)
			// 		out.print(b[i][j]);
			ArrayList<Integer> r,c;
			r = new ArrayList<>();
			c = new ArrayList<>();
			for(int i=1;i<=4;i++){
				int c1 = 0;
				for(int j : b[i])
					if(j==1)c1++;
				if(c1==4)r.add(i);
			}
			for(int i=1;i<=4;i++){
				int c1 = 0;
				for(int j=1;j<=4;j++)
					if(b[j][i]==1)
						c1++;
				if(c1==4)c.add(i);
			}
			for(int i : r)
				Arrays.fill(b[i],0);
			for(int i : c){
				for(int j=1;j<=4;j++)
					b[j][i] = 0;
			}
		}
	}

	public static void main(String[] args){
		solve();
		out.close();
	}
	static class FastReader{
        BufferedReader br;
        StringTokenizer st;
        public FastReader(){
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastReader(String s) throws Exception{
            br = new BufferedReader(new FileReader(s));
        }

        String next(){
            while (st == null || !st.hasMoreElements()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (IOException  e){
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine(){
            String str = "";
            try{
                str = br.readLine();
            }catch (IOException e){
                e.printStackTrace();
            }
            return str;
        }
        int nextInt(){return Integer.parseInt(in.next());}
    	long nextLong(){return Long.parseLong(in.next());}
    	double nextDouble(){return Double.parseDouble(in.next());}
    }
    static class pair{
    	int f,s;
    	public pair(int f,int s){
    		this.f = f;
    		this.s = s;
    	}
    }
}


import java.util.*;
import java.io.*;

public class main{

	static FastReader in = new FastReader();
	static PrintWriter out = new PrintWriter(System.out);
	static int N = (int)1e5+5;

	static void solve(){
		char[] a = in.next().toCharArray();
		int z = 0, o = 1;
		for(int i=0;i<a.length;i++){
			if(a[i]=='1'){
				out.println("1 "+(z%2==0?1:3));
				z++;
			}
			else{
				out.println("2 "+(o++));
				o = o>4?1:o;
			}
		}
	}

	public static void main(String[] args){
		solve();
		out.close();
	}
	static class FastReader{
        BufferedReader br;
        StringTokenizer st;
        public FastReader(){
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastReader(String s) throws Exception{
            br = new BufferedReader(new FileReader(s));
        }

        String next(){
            while (st == null || !st.hasMoreElements()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (IOException  e){
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine(){
            String str = "";
            try{
                str = br.readLine();
            }catch (IOException e){
                e.printStackTrace();
            }
            return str;
        }
        int nextInt(){return Integer.parseInt(in.next());}
    	long nextLong(){return Long.parseLong(in.next());}
    	double nextDouble(){return Double.parseDouble(in.next());}
    }
    static class pair{
    	int f,s;
    	public pair(int f,int s){
    		this.f = f;
    		this.s = s;
    	}
    }
}


import java.util.*;
public class MyClass {
    static boolean[][] b;
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        b = new boolean[4][4];
        String s = scan.next();
        for(int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == '0') placeVertical();
            else placeHorizontal();
            go(b);
            /*for(int j = 0; j< 4; j++) {
                for(int k = 0; k < 4; k++) System.out.print(b[j][k] + " ");
                System.out.println();
            }*/
        }

    }

    static void placeVertical() {
        int r = 1, col = 1;
        int max = -1;
        boolean[][] c = new boolean[4][4];
        for(int i = 0; i < 4; i++) {
            for(int j = 0; j < 4; j++) c[i][j] = b[i][j];
        }
        for(int i = 0; i < 3; i++) {
            for(int j = 0; j < 4; j++) {
                int a = -1;
                if(!c[i][j] && !c[i+1][j]) {
                    c[i][j] = true;
                    c[i+1][j] = true;
                    a = remove(c);
                    c[i][j] = false;
                    c[i+1][j] = false;
                }
                if(max < a) {
                    max = a;
                    r = i + 1;
                    col = j + 1;
                    //System.out.println(r);
                }
            }
        }
        System.out.println(r + " " + col);
        b[r-1][col-1] = true;
        b[r][col-1] = true;

    }

    static void placeHorizontal() {
        int r = 1, col = 1;
        int max = -1;
        boolean[][] c = new boolean[4][4];
        for(int i = 0; i < 4; i++) {
            for(int j = 0; j < 4; j++) c[i][j] = b[i][j];
        }
        for(int j = 0; j < 3; j++) {
            for(int i = 0; i < 4; i++) {
                int a = -1;
                if(!c[i][j] && !c[i][j+1]) {
                    c[i][j] = true;
                    c[i][j+1] = true;
                    a = remove(c);
                    c[i][j] = false;
                    c[i][j+1] = false;
                }
                if(max < a) {
                    max = a;
                    r = i + 1;
                    col = j + 1;
                    //System.out
                }
            }
        }
        System.out.println(r + " " + col);
        b[r-1][col-1] = true;
        b[r-1][col] = true;
    }

    static void go(boolean[][] c) {
        boolean[][] a = new boolean[4][4];
        for(int i = 0; i < 4; i++) for(int j = 0; j < 4; j++) a[i][j] = c[i][j];
        for(int i = 0; i < 4; i++) {
            boolean h = true;
            for(int j = 0; j < 4; j++) {
                if(!a[i][j]) {
                    h = false;
                    break;
                }
            }
            if(h) Arrays.fill(c[i], false);
        }
        for(int j = 0; j < 4; j++) {
            boolean h = true;
            for(int i = 0; i < 4; i++) {
                if(!a[i][j]) {
                    h = false;
                    break;
                }
            }
            if(h) {
                for(int i = 0; i < 4; i++) {
                    c[i][j] = false;
                }
            }
        }
    }

    static int remove(boolean[][] c) {
        int count = 0;
        int[][] a = new int[4][4];
        for(int i = 0; i < 4; i++) {
            Arrays.fill(a[i], 2);
        }
        for(int i = 0; i < 4; i++) {
            boolean h = true;
            for(int j = 0; j < 4; j++) {
                if(!c[i][j]) {
                    h = false;
                    break;
                }
            }
            if(h) {
                for(int j = 0; j < 4; j++) {
                    a[i][j]--;
                    count += a[i][j];
                }
            }
        }
        for(int j = 0; j < 4; j++) {
            boolean h = true;
            for(int i = 0; i < 4; i++) {
                if(!c[i][j]) {
                    h = false;
                    break;
                }
            }
            if(h) {
                for(int i = 0; i < 4; i++) {
                    a[i][j]--;
                    count += a[i][j];
                }
            }
        }
        return count;
    }
}


import java.util.*;
public class MyClass {
    static boolean[][] b;
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        b = new boolean[4][4];
        String s = scan.next();
        for(int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == '0') placeVertical();
            else placeHorizontal();
            go(b);
        }

    }

    static void placeHorizontal() {
        int r = 1, col = 1;
        int max = 0;
        boolean[][] c = new boolean[4][4];
        for(int i = 0; i < 4; i++) {
            for(int j = 0; j < 4; j++) c[i][j] = b[i][j];
        }
        for(int i = 0; i < 3; i++) {
            for(int j = 0; j < 4; j++) {
                int a = 0;
                if(!c[i][j] && !c[i+1][j]) {
                    c[i][j] = true;
                    c[i+1][j] = true;
                    a = remove(c);
                    c[i][j] = false;
                    c[i+1][j] = false;
                }
                if(max < a) {
                    a = max;
                    r = i + 1;
                    col = j + 1;
                }
            }
        }
        System.out.println(r + " " + col);
        b[r-1][col-1] = true;
        b[r][col-1] = true;

    }

    static void placeVertical() {
        int r = 1, col = 1;
        int max = 0;
        boolean[][] c = new boolean[4][4];
        for(int i = 0; i < 4; i++) {
            for(int j = 0; j < 4; j++) c[i][j] = b[i][j];
        }
        for(int j = 0; j < 3; j++) {
            for(int i = 0; i < 4; i++) {
                int a = 0;
                if(!c[i][j] && !c[i][j+1]) {
                    c[i][j] = true;
                    c[i][j+1] = true;
                    a = remove(c);
                    c[i][j] = false;
                    c[i][j+1] = false;
                }
                if(max < a) {
                    a = max;
                    r = i + 1;
                    col = j + 1;
                }
            }
        }
        System.out.println(r + " " + col);
        b[r-1][col-1] = true;
        b[r-1][col] = true;
    }

    static void go(boolean[][] c) {
        boolean[][] a = new boolean[4][4];
        for(int i = 0; i < 4; i++) for(int j = 0; j < 4; j++) a[i][j] = c[i][j];
        for(int i = 0; i < 4; i++) {
            boolean h = true;
            for(int j = 0; j < 4; j++) {
                if(!a[i][j]) {
                    h = false;
                    break;
                }
            }
            if(h) Arrays.fill(c[i], false);
        }
        for(int j = 0; j < 4; j++) {
            boolean h = true;
            for(int i = 0; i < 4; i++) {
                if(!a[i][j]) {
                    h = false;
                    break;
                }
            }
            if(h) {
                for(int i = 0; i < 4; i++) {
                    c[i][j] = false;
                }
            }
        }
    }

    static int remove(boolean[][] c) {
        int count = 0;
        int[][] a = new int[4][4];
        for(int i = 0; i < 4; i++) {
            Arrays.fill(a[i], 2);
        }
        for(int i = 0; i < 4; i++) {
            boolean h = true;
            for(int j = 0; j < 4; j++) {
                if(!c[i][j]) {
                    h = false;
                    break;
                }
            }
            if(h) {
                for(int j = 0; j < 4; j++) {
                    a[i][j]--;
                    count += a[i][j];
                }
            }
        }
        for(int j = 0; j < 4; j++) {
            boolean h = true;
            for(int i = 0; i < 4; i++) {
                if(!c[i][j]) {
                    h = false;
                    break;
                }
            }
            if(h) {
                for(int i = 0; i < 4; i++) {
                    a[i][j]--;
                    count += a[i][j];
                }
            }
        }
        return count;
    }
}


import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String pat=sc.next();
        int[][] val=new int[5][5];

        for(char c:pat.toCharArray()){
            int[] num=getCoordinate(c,val);
            System.out.println(num[0]+" "+num[1]);
            reset(val);
        }
    }

    public static int[] getCoordinate(char c,int[][] val){
        if(c=='0'){
            for(int i=1;i<=3;i++){
                for(int j=1;j<=4;j++){
                    if(val[i][j]==0 && val[i+1][j]==0){
                        val[i][j]=1; val[i+1][j]=1;
                        return new int[]{i,j};
                    }
                }
            }
        }else{
            for(int i=1;i<=4;i++){
                for(int j=1;j<=3;j++){
                    if(val[i][j]==0 && val[i][j+1]==0){
                        val[i][j]=1; val[i][j+1]=1;
                        return new int[]{i,j};
                    }
                }
            }
        }
        return new int[]{-1,-1};
    }

    public static void reset(int[][] val){
        boolean flag=false;
        for(int i=1;i<=4;i++){
            flag=true;
            for(int j=1;j<=4;j++){
                if(val[i][j]==0){
                    flag=false;
                    break;
                }
            }
            if(flag)
                Arrays.fill(val[i],0);
        }
    }
}


import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String pat=sc.next();
        int[][] val=new int[5][5];

        for(char c:pat.toCharArray()){
            int[] num=getCoordinate(c,val);
            System.out.println(num[0]+" "+num[1]);
            reset(val);
        }
    }

    public static int[] getCoordinate(char c,int[][] val){
        if(c=='0'){
            for(int i=1;i<=3;i++){
                for(int j=1;j<=4;j++){
                    if(val[i][j]==0 && val[i+1][j]==0){
                        val[i][j]=1; val[i+1][j]=1;
                        return new int[]{i,j};
                    }
                }
            }
        }else{
            for(int i=4;i>=1;i--){
                for(int j=3;j>=1;j--){
                    if(val[i][j]==0 && val[i][j+1]==0){
                        val[i][j]=1; val[i][j+1]=1;
                        return new int[]{i,j};
                    }
                }
            }
        }
        return new int[]{-1,-1};
    }

    public static void reset(int[][] val){
        int[] row=new int[5];
        int[] col=new int[5];

        for(int i=1;i<=4;i++){
           for(int j=1;j<=4;j++){
                col[j]+=val[i][j];
                row[i]+=val[i][j];
            }
        }

        for(int i=1;i<=4;i++){
           for(int j=1;j<=4;j++){
                if(row[i]==4 || col[j]==4)
                    val[i][j]=0;
            }
        }
    }
}


import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String pat=sc.next();
        int[][] val=new int[5][5];

        for(char c:pat.toCharArray()){
            int[] num=getCoordinate(c,val);
            System.out.println(num[0]+" "+num[1]);
            reset(val);
        }
    }

    public static int[] getCoordinate(char c,int[][] val){
        if(c=='0'){
            for(int i=1;i<=3;i++){
                for(int j=1;j<=4;j++){
                    if(val[i][j]==0 && val[i+1][j]==0){
                        val[i][j]=1; val[i+1][j]=1;
                        return new int[]{i,j};
                    }
                }
            }
        }else{
            for(int i=1;i<=4;i++){
                for(int j=1;j<=3;j++){
                    if(val[i][j]==0 && val[i][j+1]==0){
                        val[i][j]=1; val[i][j+1]=1;
                        return new int[]{i,j};
                    }
                }
            }
        }
        return new int[]{-1,-1};
    }

    public static void reset(int[][] val){
        int[] row=new int[5];
        int[] col=new int[5];

        for(int i=1;i<=4;i++){
           for(int j=1;j<=4;j++){
                col[j]+=val[i][j];
                row[i]+=val[i][j];
            }
        }

        for(int i=1;i<=4;i++){
           for(int j=1;j<=4;j++){
                if(row[i]==4 || col[j]==4)
                    val[i][j]=0;
            }
        }
    }
}


import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String pat=sc.next();
        int[][] val=new int[5][5];

        for(char c:pat.toCharArray()){
            int[] num=getCoordinate(c,val);
            System.out.println(num[0]+" "+num[1]);
        }
    }

    public static int[] getCoordinate(char c,int[][] val){
        if(c=='0'){
            for(int i=1;i<=3;i++){
                for(int j=1;j<=4;j++){
                    if(val[i][j]==0 && val[i+1][j]==0){
                        val[i][j]=1; val[i+1][j]=1;
                        return new int[]{i,j};
                    }
                }
            }
        }else{
            for(int i=1;i<=4;i++){
                for(int j=1;j<=3;j++){
                    if(val[i][j]==0 && val[i][j+1]==0){
                        val[i][j]=1; val[i][j+1]=1;
                        return new int[]{i,j};
                    }
                }
            }
        }
        return new int[]{-1,-1};
    }

    public static void reset(int[][] val){
        boolean flag=false;
        for(int i=1;i<=4;i++){
            flag=true;
            for(int j=1;j<=4;j++){
                if(val[i][j]==0){
                    flag=false;
                    break;
                }
            }
            if(flag)
                Arrays.fill(val[i],0);
        }
    }
}


import  java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.*;
import java.math.*;
import java.io.*;
import java.text.*;

public class Main
{

    public static boolean[] sieve(long n)
    {
        boolean[] prime = new boolean[(int)n+1];
        Arrays.fill(prime,true);
        prime[0] = false;
        prime[1] = false;
        long m = (long)Math.sqrt(n);
        for(int i=2;i<=m;i++)
        {
            if(prime[i])
            {
                for(int k=i*i;k<=n;k+=i)
                {
                    prime[k] = false;
                }
            }
        }
        return prime;
    }

    static long GCD(long a,long b)
    {
        if(a==0 || b==0)
        {
            return 0;
        }
        if(a==b)
        {
            return a;
        }
        if(a>b)
        {
            return GCD(a-b,b);
        }
        return GCD(a,b-a);
    }

    static long CountCoPrimes(long n)
    {
        long res = n;
        for(int i=2;i*i<=n;i++)
        {
            if(n%i==0)
            {
                while(n%i==0)
                {
                    n/=i;
                }
                res-=res/i;
            }
        }
        if(n>1)
        {
            res-=res/n;
        }
        return res;
    }

    //fastest way to find x**n
    static long modularExponentiation(long x,long n,long m)
    {
        long res = 1;
        while(n>0)
        {
            if(n%2==1)
            {
                res = (res*x)%m;
            }
            x =(x*x)%m;
            n/=2;
        }
        return res;
    }

    static long lcm(long a,long b)
    {
        return (a*b)/GCD(a,b);
    }

    static long pow(long a,long b)
    {
        long res = 1;
        while(b>0)
        {
            if((b&1)==1)
            {
                res *= a;
            }

            b >>= 1;
            a *=a;
        }
        return res;
    }

   static long modInverse(long A,long M)
   {
    return modularExponentiation(A,M-2,M);
   }

    static boolean prime(int n)
    {
        for(int i=2;i*i<=n;i++)
        {
            if(i%2==0 ||i%3==0)
            {
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) throws IOException
    {

        new Main().run();

    }

    static void reverse(long[] a,long n)
    {
        int start=0;
        int end = (int)n;
        while(start!=end)
        {
            long temp = a[start];
            a[start] = a[end];
            a[end] = temp;
            start++;
            end--;
        }
    }

    static Scanner in = new Scanner(System.in);
    static void run() throws IOException
    {
        char[] c = si().toCharArray();
        int count=0;
        int c2=0;
        for(int i=0;i<c.length;i++)
        {
            if(c[i]=='0')
            {
                if(count==4)
                {
                    System.out.println(1+" "+count);
                    count=0;
                }
                else
                {
                    count++;
                    System.out.println(1+" "+count);

                }

            }
            else
            {
                if(c2==3)
                {
                    printS(3+" "+c2);
                    c2=0;
                }
                else
                {
                   c2=1;
                    printS(3+" "+c2);
                    c2+=2;

                }

            }
        }
    }

    //xor range query
    static long xor(long n)
    {

        if(n%4==0)
        {
            return n;
        }
        if(n%4==1)
        {
            return  1;
        }
        if(n%4==2)
        {
            return n+1;
        }
        return 0;
    }

    static long xor(long a,long b)
    {
        return xor(b)^xor(a-1);
    }

    static void printL(long a)
    {
        System.out.println(a);
    }
    static void printS(String s)
    {
        System.out.println(s);
    }

    static void printD(Double d)
    {
        System.out.println(d);
    }

    static void swap(char c,char p)
    {
        char t = c;
        c = p;
        p = t;
    }

    static long max(long n,long m)
    {
        return Math.max(n,m);
    }
    static long min(long n,long m)
    {
        return Math.min(n,m);
    }

    static double nd() throws IOException
    {
        return Double.parseDouble(in.next());
    }
    static int ni() throws IOException
    {
        return Integer.parseInt(in.next());
    }

    static long nl() throws IOException
    {
        return Long.parseLong(in.next());
    }

    static String si() throws IOException
    {
        return in.next();
    }

    static int abs(int n)
    {
        return Math.abs(n);
    }

    static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){  br = new BufferedReader(new InputStreamReader(s));}

        public String next() throws IOException
        {
            while (st == null || !st.hasMoreTokens())
            {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public int nextInt() throws IOException {return Integer.parseInt(next());}

        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public boolean ready() throws IOException {return br.ready();}

    }

}


import  java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.*;
import java.math.*;
import java.io.*;
import java.text.*;

public class Main
{

    public static boolean[] sieve(long n)
    {
        boolean[] prime = new boolean[(int)n+1];
        Arrays.fill(prime,true);
        prime[0] = false;
        prime[1] = false;
        long m = (long)Math.sqrt(n);
        for(int i=2;i<=m;i++)
        {
            if(prime[i])
            {
                for(int k=i*i;k<=n;k+=i)
                {
                    prime[k] = false;
                }
            }
        }
        return prime;
    }

    static long GCD(long a,long b)
    {
        if(a==0 || b==0)
        {
            return 0;
        }
        if(a==b)
        {
            return a;
        }
        if(a>b)
        {
            return GCD(a-b,b);
        }
        return GCD(a,b-a);
    }

    static long CountCoPrimes(long n)
    {
        long res = n;
        for(int i=2;i*i<=n;i++)
        {
            if(n%i==0)
            {
                while(n%i==0)
                {
                    n/=i;
                }
                res-=res/i;
            }
        }
        if(n>1)
        {
            res-=res/n;
        }
        return res;
    }

    //fastest way to find x**n
    static long modularExponentiation(long x,long n,long m)
    {
        long res = 1;
        while(n>0)
        {
            if(n%2==1)
            {
                res = (res*x)%m;
            }
            x =(x*x)%m;
            n/=2;
        }
        return res;
    }

    static long lcm(long a,long b)
    {
        return (a*b)/GCD(a,b);
    }

    static long pow(long a,long b)
    {
        long res = 1;
        while(b>0)
        {
            if((b&1)==1)
            {
                res *= a;
            }

            b >>= 1;
            a *=a;
        }
        return res;
    }

   static long modInverse(long A,long M)
   {
    return modularExponentiation(A,M-2,M);
   }

    static boolean prime(int n)
    {
        for(int i=2;i*i<=n;i++)
        {
            if(i%2==0 ||i%3==0)
            {
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) throws IOException
    {

        new Main().run();

    }

    static void reverse(long[] a,long n)
    {
        int start=0;
        int end = (int)n;
        while(start!=end)
        {
            long temp = a[start];
            a[start] = a[end];
            a[end] = temp;
            start++;
            end--;
        }
    }

    static Scanner in = new Scanner(System.in);
    static void run() throws IOException
    {
        char[] c = si().toCharArray();
        int count=1;
        int c2=1;
        for(int i=0;i<c.length;i++)
        {
            if(c[i]=='0')
            {
                printS(1+" "+count);
                if(count==4)
                {
                   count=1;
                }
                else
                {
                    count++;

                }

            }
            else
            {
                printS(3+" "+c2);
                if(c2==3)
                {
                   c2=1;
                }
                else
                {

                    c2+=2;

                }

            }
        }
    }

    //xor range query
    static long xor(long n)
    {

        if(n%4==0)
        {
            return n;
        }
        if(n%4==1)
        {
            return  1;
        }
        if(n%4==2)
        {
            return n+1;
        }
        return 0;
    }

    static long xor(long a,long b)
    {
        return xor(b)^xor(a-1);
    }

    static void printL(long a)
    {
        System.out.println(a);
    }
    static void printS(String s)
    {
        System.out.println(s);
    }

    static void printD(Double d)
    {
        System.out.println(d);
    }

    static void swap(char c,char p)
    {
        char t = c;
        c = p;
        p = t;
    }

    static long max(long n,long m)
    {
        return Math.max(n,m);
    }
    static long min(long n,long m)
    {
        return Math.min(n,m);
    }

    static double nd() throws IOException
    {
        return Double.parseDouble(in.next());
    }
    static int ni() throws IOException
    {
        return Integer.parseInt(in.next());
    }

    static long nl() throws IOException
    {
        return Long.parseLong(in.next());
    }

    static String si() throws IOException
    {
        return in.next();
    }

    static int abs(int n)
    {
        return Math.abs(n);
    }

    static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){  br = new BufferedReader(new InputStreamReader(s));}

        public String next() throws IOException
        {
            while (st == null || !st.hasMoreTokens())
            {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        public int nextInt() throws IOException {return Integer.parseInt(next());}

        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public boolean ready() throws IOException {return br.ready();}

    }

}


import java.io.*;
import java.util.*;

public class C_GridGame {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader inp = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(inp, out);
        out.close();
    }

    private static class Solver {
        private void solve(InputReader inp, PrintWriter out) {
            char[] s = inp.next().toCharArray();

            String[] a = new String[] {"1 1", "1 3"};
            String[] b = new String[] {"3 1", "3 2", "3 3", "3 4"};
            int e = 0, f = 0;

            for (char c: s) {
                if (c == '0') {
                    out.println(b[f]);
                    f = (f + 1) % 4;
                } else {
                    out.println(a[e]);
                    e = (e + 1) % 2;
                }
            }
        }
    }

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}


import java.io.*;
import java.util.*;

public class C_GridGame {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader inp = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(inp, out);
        out.close();
    }

    private static class Solver {
        private void solve(InputReader inp, PrintWriter out) {
            char[] s = inp.next().toCharArray();

            String[] a = new String[] {"1 1", "1 3"};
            String[] b = new String[] {"3 1", "3 2", "3 3", "3 4"};
            int e = 0, f = 0;

            for (char c: s) {
                if (c == '0') out.println(b[f++]);
                else out.println(a[e++]);
            }
        }
    }

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}


import java.io.*;
import java.util.*;

import java.lang.Math.*;

public class Main {
    static class Writer {
        PrintWriter cout;

        Writer() throws IOException {
            cout = new PrintWriter(System.out);
        }

        Writer(String name) throws IOException {
            cout = new PrintWriter(new FileWriter(name));
        }

        StringBuilder out = new StringBuilder();

        void print(Object a) {
            out.append(a);
        }

        void close() {
            cout.print(out.toString());
            cout.close();
        }
    }

    static class Reader {
        BufferedReader in;

        Reader() throws IOException {
            in = new BufferedReader(new InputStreamReader(System.in), 32768);
        }

        Reader(String name) throws IOException {
            in = new BufferedReader(new FileReader(name));
        }

        StringTokenizer tokin = new StringTokenizer("");

        String next() throws IOException {
            if (!tokin.hasMoreTokens()) {
                tokin = new StringTokenizer(in.readLine());
            }
            return tokin.nextToken();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }
    }

    public static void main(String args[]) throws IOException {
        Reader in = new Reader();
        Writer out = new Writer();
        String s = in.next();
        boolean po[][] = new boolean[4][4];
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '0') {
                if (!po[2][0]) {
                    po[2][0] = true;
                    po[2][1] = true;
                    out.print("1 3\n");
                } else {
                    if (!po[3][0]) {
                        po[3][0] = true;
                        po[3][1] = true;
                        out.print("1 4\n");
                    } else {
                        if (!po[2][2]) {
                            po[2][2] = true;
                            po[2][3] = true;
                            out.print("3 3\n");
                        } else {
                            po[3][2] = true;
                            po[3][3] = true;
                            out.print("3 4\n");
                        }
                    }
                }
            }
            if (s.charAt(i) == '1') {
                if (!po[0][0]) {
                    po[0][0] = true;
                    po[1][0] = true;
                    out.print("1 1\n");
                } else {
                    if (!po[0][1]) {
                        po[0][1] = true;
                        po[1][1] = true;
                        out.print("2 1\n");
                    } else {
                        if (!po[0][2]) {
                            po[0][2] = true;
                            po[1][2] = true;
                            out.print("3 1\n");
                        } else {
                            po[0][3] = true;
                            po[1][3] = true;
                            out.print("4 1\n");
                        }
                    }
                }
            }
            boolean must = true;
            for (int j = 0; j < 4; j++) {
                if (!po[j][0] || !po[j][1])
                    must = false;
            }
            if (must) {
                for (int j = 0; j < 4; j++) {
                    po[j][0] = false;
                    po[j][1] = false;
                }
            }
            must = true;
            for (int j = 0; j < 4; j++) {
                if (!po[0][j] || !po[1][j])
                    must = false;
            }
            if (must) {
                for (int j = 0; j < 4; j++) {
                    po[0][j] = false;
                    po[1][j] = false;
                }
            }
            must = true;
            for (int j = 0; j < 4; j++) {
                if (!po[2][j] || !po[3][j])
                    must = false;
            }
            if (must) {
                for (int j = 0; j < 4; j++) {
                    po[2][j] = false;
                    po[3][j] = false;
                }
            }
        }
        out.close();
    }
}


import java.io.*;
import java.util.*;

import java.lang.Math.*;

public class Main {
    static class Writer {
        PrintWriter cout;

        Writer() throws IOException {
            cout = new PrintWriter(System.out);
        }

        Writer(String name) throws IOException {
            cout = new PrintWriter(new FileWriter(name));
        }

        StringBuilder out = new StringBuilder();

        void print(Object a) {
            out.append(a);
        }

        void close() {
            cout.print(out.toString());
            cout.close();
        }
    }

    static class Reader {
        BufferedReader in;

        Reader() throws IOException {
            in = new BufferedReader(new InputStreamReader(System.in), 32768);
        }

        Reader(String name) throws IOException {
            in = new BufferedReader(new FileReader(name));
        }

        StringTokenizer tokin = new StringTokenizer("");

        String next() throws IOException {
            if (!tokin.hasMoreTokens()) {
                tokin = new StringTokenizer(in.readLine());
            }
            return tokin.nextToken();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }
    }

    public static void main(String args[]) throws IOException {
        Reader in = new Reader();
        Writer out = new Writer();
        String s = in.next();
        int nol = 0;
        int one = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '0') {
                out.print((nol * 2 + 1) + " 1\n");
                nol++;
                nol %= 2;
            }
            if (s.charAt(i) == '1') {
                out.print((one + 1) + " 3\n");
                one++;
                one %= 4;
            }
        }
        out.close();
    }
}


import java.io.*;
import java.math.*;
import java.util.*;

// author @mdazmat9
public class codeforces{
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int test = 1;
        for (int ind = 0; ind < test; ind++) {
            String s=sc.next();
            char[] c=s.toCharArray();
            boolean ch[][] = new boolean[4][4];

            for(int i = 0; i<c.length; i++){
                if(c[i]=='0'){
                    if(!ch[0][0]){
                        System.out.println("1 1");
                        ch[0][0] = true;
                    }
                    else{
                        System.out.println("3 1");
                        ch[0][0] = false;
                    }
                }
                else{
                    if(!ch[3][3]){
                        System.out.println("4 3");
                        ch[3][3] = true;
                    }
                    else{
                        System.out.println("4 1");
                        ch[3][3] = false;
                    }
                }
            }

        }
        out.flush();

    }

    static long gcd(long a , long b)
    {
        if(b == 0)
            return a;
        return gcd(b , a % b);
    }

}
class Scanner {
    public BufferedReader reader;
    public StringTokenizer st;

    public Scanner(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        st = null;
    }

    public String next() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = reader.readLine();
                if (line == null) return null;
                st = new StringTokenizer(line);
            } catch (Exception e) {
                throw (new RuntimeException());
            }
        }
        return st.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}

class OutputWriter {
    BufferedWriter writer;

    public OutputWriter(OutputStream stream) {
        writer = new BufferedWriter(new OutputStreamWriter(stream));
    }

    public void print(int i) throws IOException {
        writer.write(i);
    }

    public void print(String s) throws IOException {
        writer.write(s);
    }

    public void print(char[] c) throws IOException {
        writer.write(c);
    }

    public void close() throws IOException {
        writer.close();
    }

}


import java.io.*;
import java.math.*;
import java.util.*;

// author @mdazmat9
public class codeforces{
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int test = 1;
        for (int ind = 0; ind < test; ind++) {
            String s=sc.next();
            int a[][]=new int[4][4];
            int out1=-1,out2=-1;
            for(int i=0;i<s.length();i++){
                if(s.charAt(i)=='0'){
                    for(int j=0;j<4-1;j++){
                        int temp=-1;
                        for(int k=0;k<4;k++){
                            if(a[j][k]==0 && a[j+1][k]==0){
                                a[j][k]=1;
                                a[j+1][k]=1;
                                out1=j+1;
                                out2=k+1;
                                temp=1;
                                break;
                            }

                        }
                        if(temp==1)
                            break;
                    }
                }
                else{
                    for(int j=0;j<4;j++){
                        int temp=-1;
                        for(int k=0;k<4-1;k++){
                            if(a[j][k]==0 && a[j][k+1]==0){
                                a[j][k]=1;
                                a[j][k+1]=1;
                                out1=j+1;
                                out2=k+1;

                                temp=1;
                                break;
                            }
                        }
                        if(temp==1)
                            break;
                    }

                }
                out.println(out1+" "+out2);

                for(int j=0;j<4;j++){
                    if(a[j][0]==1 && a[j][1]==1 &&a[j][2]==1 &&a[j][3]==1 ){
                        a[j][0]=0;
                        a[j][1]=0;
                        a[j][2]=0;
                        a[j][3]=0;
                    }
                }
                for(int j=0;j<4;j++){
                    if(a[0][j]==1 && a[1][j]==1 &&a[2][j]==1 &&a[3][j]==1 ){
                        a[0][j]=0;
                        a[1][j]=0;
                        a[2][j]=0;
                        a[3][j]=0;
                    }
                }
            }

        }
        out.flush();

    }

    static long gcd(long a , long b)
    {
        if(b == 0)
            return a;
        return gcd(b , a % b);
    }

}
class Scanner {
    public BufferedReader reader;
    public StringTokenizer st;

    public Scanner(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        st = null;
    }

    public String next() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = reader.readLine();
                if (line == null) return null;
                st = new StringTokenizer(line);
            } catch (Exception e) {
                throw (new RuntimeException());
            }
        }
        return st.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}

class OutputWriter {
    BufferedWriter writer;

    public OutputWriter(OutputStream stream) {
        writer = new BufferedWriter(new OutputStreamWriter(stream));
    }

    public void print(int i) throws IOException {
        writer.write(i);
    }

    public void print(String s) throws IOException {
        writer.write(s);
    }

    public void print(char[] c) throws IOException {
        writer.write(c);
    }

    public void close() throws IOException {
        writer.close();
    }

}


import java.util.*;
import java.io.*;

public class Main {
    static OutputWriter out;
    public static void main(String[] args)
    {
        InputReader in = new InputReader(System.in);

        out = new OutputWriter(System.out);
        String s = in.readString();
        int n = s.length();
        int ones = 0;
        int zeros =0;
        for (int i =0;i<n;i++)
        {
            if (s.charAt(i)=='0')
            {
                zeros++;
                if (zeros%2==1)
                {
                    out.printLine(1+" "+1);
                }
                else
                {
                    out.printLine(3+" "+1);
                }

            }
            else
            {
                ones++;
                if (ones%4==1)
                    out.printLine(1+" "+2);
                else if (ones%4==2)
                    out.printLine(2+" "+2);
                else if (ones%4==3)
                    out.printLine(3+" "+2);
                else
                    out.printLine(4+" "+2);

            }
        }
        out.flush();
    }

}
class MyScanner {

    StringTokenizer st;
    BufferedReader br;

    public MyScanner(InputStream s) {
        br = new BufferedReader(new InputStreamReader(s));
    }

    public MyScanner (FileReader f) {
        br = new BufferedReader(f);
    }

    public String next() throws IOException {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    public long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    public String nextLine() throws IOException {
        return br.readLine();
    }

    public double nextDouble() throws IOException {
        String x = next();
        StringBuilder sb = new StringBuilder("0");
        double res = 0, f = 1;
        boolean dec = false, neg = false;
        int start = 0;
        if (x.charAt(0) == '-') {
            neg = true;
            start++;
        }
        for (int i = start; i < x.length(); i++)
            if (x.charAt(i) == '.') {
                res = Long.parseLong(sb.toString());
                sb = new StringBuilder("0");
                dec = true;
            } else {
                sb.append(x.charAt(i));
                if (dec)
                    f *= 10;
            }
        res += Long.parseLong(sb.toString()) / f;
        return res * (neg ? -1 : 1);
    }

    public boolean ready() throws IOException {
        return br.ready();
    }

    public boolean nextEmpty() throws IOException {
        String s = nextLine();
        st = new StringTokenizer(s);
        return s.isEmpty();
    }
}

class pair  implements Comparable
{
    int dist;
    int to;
    public pair(int to, int dist)
    {
        this.dist = dist;
        this.to = to;
    }
    @Override
    public int compareTo(Object o) {
        pair temp =(pair)o;
        if (dist<temp.dist)
            return -1;
        else if (dist>temp.dist)
            return 1;
        else
            return 0;
    }
}
class Graph {

    int n;
    ArrayList<Integer>[] adjList;

    public Graph(int n) {
        this.n = n;
        adjList = new ArrayList[n];
        for (int i = 0; i < n; i++)
            adjList[i] = new ArrayList<>();
    }

}

class InputReader {

    private final InputStream stream;
    private final byte[] buf = new byte[8192];
    private int curChar, snumChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (snumChars == -1)
            throw new InputMismatchException();
        if (curChar >= snumChars) {
            curChar = 0;
            try {
                snumChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (snumChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int nextInt() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public long nextLong() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public int[] nextIntArray(int n) {
        int a[] = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
        }
        return a;
    }

    public String readString() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    public String nextLine() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isEndOfLine(c));
        return res.toString();
    }

    public boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private boolean isEndOfLine(int c) {
        return c == '\n' || c == '\r' || c == -1;
    }

}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

    public void flush() {
        writer.flush();
    }

}


import java.util.*;
import java.io.*;

public class Main {
    static OutputWriter out;
    public static void main(String[] args)
    {
        InputReader in = new InputReader(System.in);

        out = new OutputWriter(System.out);
        String s = in.readString();
        int n = s.length();
        int ones = 0;
        int zeros =0;
        for (int i =0;i<n;i++)
        {
            if (s.charAt(i)=='0')
            {
                zeros++;
                if (zeros==1)
                {
                    out.printLine(1+" "+1);
                }
                else if (zeros==2)
                {
                    out.printLine(3+" "+1);
                }
                else
                {
                    out.printLine(1+" "+1);
                }
            }
            else
            {
                ones++;
                if (ones==1)
                    out.printLine(1+" "+2);
               else if (ones==2)
                    out.printLine(2+" "+2);
               else if (ones==3)
                    out.printLine(3+" "+2);
               else if (ones==4)
                    out.printLine(4+" "+2);
                else
                    out.printLine(1+" "+2);
            }
        }
        out.flush();
    }

}
class MyScanner {

    StringTokenizer st;
    BufferedReader br;

    public MyScanner(InputStream s) {
        br = new BufferedReader(new InputStreamReader(s));
    }

    public MyScanner (FileReader f) {
        br = new BufferedReader(f);
    }

    public String next() throws IOException {
        while (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    public long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    public String nextLine() throws IOException {
        return br.readLine();
    }

    public double nextDouble() throws IOException {
        String x = next();
        StringBuilder sb = new StringBuilder("0");
        double res = 0, f = 1;
        boolean dec = false, neg = false;
        int start = 0;
        if (x.charAt(0) == '-') {
            neg = true;
            start++;
        }
        for (int i = start; i < x.length(); i++)
            if (x.charAt(i) == '.') {
                res = Long.parseLong(sb.toString());
                sb = new StringBuilder("0");
                dec = true;
            } else {
                sb.append(x.charAt(i));
                if (dec)
                    f *= 10;
            }
        res += Long.parseLong(sb.toString()) / f;
        return res * (neg ? -1 : 1);
    }

    public boolean ready() throws IOException {
        return br.ready();
    }

    public boolean nextEmpty() throws IOException {
        String s = nextLine();
        st = new StringTokenizer(s);
        return s.isEmpty();
    }
}

class pair  implements Comparable
{
    int dist;
    int to;
    public pair(int to, int dist)
    {
        this.dist = dist;
        this.to = to;
    }
    @Override
    public int compareTo(Object o) {
        pair temp =(pair)o;
        if (dist<temp.dist)
            return -1;
        else if (dist>temp.dist)
            return 1;
        else
            return 0;
    }
}
class Graph {

    int n;
    ArrayList<Integer>[] adjList;

    public Graph(int n) {
        this.n = n;
        adjList = new ArrayList[n];
        for (int i = 0; i < n; i++)
            adjList[i] = new ArrayList<>();
    }

}

class InputReader {

    private final InputStream stream;
    private final byte[] buf = new byte[8192];
    private int curChar, snumChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (snumChars == -1)
            throw new InputMismatchException();
        if (curChar >= snumChars) {
            curChar = 0;
            try {
                snumChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (snumChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int nextInt() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public long nextLong() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public int[] nextIntArray(int n) {
        int a[] = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
        }
        return a;
    }

    public String readString() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    public String nextLine() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isEndOfLine(c));
        return res.toString();
    }

    public boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private boolean isEndOfLine(int c) {
        return c == '\n' || c == '\r' || c == -1;
    }

}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

    public void flush() {
        writer.flush();
    }

}


import java.util.*;
public class Abc
{
	static int count=1;
	public static void main(String args[])
	{
		Scanner in=new Scanner(System.in);
		String s=in.next();
		int ar[][]=new int[4][4];
		for(int i=0;i<s.length();i++)
		{
			char c=s.charAt(i);
			if(c=='0')
			{
				addVer(ar);
			}
			else
			{
				addHor(ar);
			}
			erase(ar);
		}
	}
	public static void addVer(int ar[][])
	{
		Outer: for(int i=0;i<3;i++)
		{
			for(int j=0;j<4;j++)
			{
				if(ar[i][j]==0&&ar[i+1][j]==0)
				{
					System.out.println(i+1+" "+(j+1));
					ar[i][j]=count;
					ar[i+1][j]=count;
					count++;
					break Outer;
				}
			}
		}
	}
	public static void addHor(int ar[][])
	{
		Outer: for(int i=0;i<4;i++)
		{
			for(int j=0;j<3;j++)
			{
				if(ar[i][j]==0&&ar[i][j+1]==0)
				{
					System.out.println(i+1+" "+(j+1));
					ar[i][j]=count;
					ar[i][j+1]=count;
					count++;
					break Outer;
				}
			}
		}
	}
	public static void erase(int ar[][])
	{
		int row[]=new int[4];
		int col[]=new int[4];
		for(int i=0;i<4;i++)
		{
			int hCount=0,vCount=0;
			for(int j=0;j<4;j++)
			{
				if(ar[i][j]!=0)
				{
					hCount++;
				}
				if(ar[j][i]!=0)
				{
					vCount++;
				}
			}
			if(vCount==4)
			{
				row[i]=1;
			}
			if(hCount==4)
			{
				col[i]=1;
			}
		}
		for(int i=0;i<4;i++)
		{
			for(int j=0;j<4;j++)
			{
				if(row[i]==1)
				{
					ar[i][j]=0;
				}
				if(col[i]==1)
				{
					ar[j][i]=0;
				}
			}
		}
	}
}


import java.util.*;
public class Abc
{
	static int count=1;
	public static void main(String args[])
	{
		Scanner in=new Scanner(System.in);
		String s=in.next();
		int ar[][]=new int[4][4];
		for(int i=0;i<s.length();i++)
		{
			char c=s.charAt(i);
			if(c=='0')
			{
				addVer(ar);
			}
			else
			{
				addHor(ar);
			}
			erase(ar);
		}
	}
	public static void addVer(int ar[][])
	{
		Outer: for(int i=0;i<3;i++)
		{
			for(int j=0;j<4;j++)
			{
				if(ar[i][j]==0&&ar[i+1][j]==0)
				{
					System.out.println(i+1+" "+(j+1));
					ar[i][j]=count;
					ar[i+1][j]=count;
					count++;
					break Outer;
				}
			}
		}
	}
	public static void addHor(int ar[][])
	{
		Outer: for(int i=0;i<4;i++)
		{
			for(int j=0;j<3;j++)
			{
				if(ar[i][j]==0&&ar[i][j+1]==0)
				{
					System.out.println(i+1+" "+(j+1));
					ar[i][j]=count;
					ar[i][j+1]=count;
					count++;
					break Outer;
				}
			}
		}
	}
	public static void erase(int ar[][])
	{
		for(int i=0;i<4;i++)
		{
			int hCount=0,vCount=0;
			for(int j=0;j<4;j++)
			{
				if(ar[i][j]!=0)
				{
					hCount++;
				}
				if(ar[j][i]!=0)
				{
					vCount++;
				}
			}
			if(vCount==4)
			{
				for(int j=0;j<4;j++)
				{
					ar[j][i]=0;
				}
			}
			if(hCount==4)
			{
				for(int j=0;j<4;j++)
				{
					ar[i][j]=0;
				}
			}
		}
	}
}


import java.util.*;
public class Abc
{
	static int count=1;
	public static void main(String args[])
	{
		Scanner in=new Scanner(System.in);
		String s=in.next();
		int ar[][]=new int[4][4];
		for(int i=0;i<s.length();i++)
		{
			char c=s.charAt(i);
			if(c=='0')
			{
				addVer(ar);
			}
			else
			{
				addHor(ar);
			}
			erase(ar);
		}
	}
	public static void addVer(int ar[][])
	{
		Outer: for(int i=0;i<3;i++)
		{
			for(int j=0;j<4;j++)
			{
				if(ar[i][j]==0&&ar[i+1][j]==0)
				{
					System.out.println(i+1+" "+(j+1));
					ar[i][j]=count;
					ar[i+1][j]=count;
					count++;
					break Outer;
				}
			}
		}
	}
	public static void addHor(int ar[][])
	{
		Outer: for(int i=0;i<4;i++)
		{
			for(int j=0;j<3;j++)
			{
				if(ar[i][j]==0&&ar[i][j+1]==0)
				{
					System.out.println(i+1+" "+(j+1));
					ar[i][j]=count;
					ar[i][j+1]=count;
					count++;
					break Outer;
				}
			}
		}
	}
	public static void erase(int ar[][])
	{
		int row[]=new int[4];
		int col[]=new int[4];
		for(int i=0;i<4;i++)
		{
			int hCount=0,vCount=0;
			for(int j=0;j<4;j++)
			{
				if(ar[i][j]!=0)
				{
					hCount++;
				}
				if(ar[j][i]!=0)
				{
					vCount++;
				}
			}
			if(vCount==4)
			{
				col[i]=1;
			}
			if(hCount==4)
			{
				row[i]=1;
			}
		}
		for(int i=0;i<4;i++)
		{
			for(int j=0;j<4;j++)
			{
				if(row[i]==1)
				{
					ar[i][j]=0;
				}
				if(col[i]==1)
				{
					ar[j][i]=0;
				}
			}
		}
	}
}


import java.util.*;
public class Abc
{
	static int count=1;
	public static void main(String args[])
	{
		Scanner in=new Scanner(System.in);
		String s=in.next();
		int ar[][]=new int[4][4];
		for(int i=0;i<s.length();i++)
		{
			char c=s.charAt(i);
			if(c=='0')
			{
				addVer(ar);
			}
			else
			{
				addHor(ar);
			}
			erase(ar);
		}
	}
	public static void addVer(int ar[][])
	{
		Outer: for(int i=0;i<3;i++)
		{
			for(int j=0;j<4;j++)
			{
				if(ar[i][j]==0&&ar[i+1][j]==0)
				{
					System.out.println(i+1+" "+(j+1));
					ar[i][j]=count;
					ar[i+1][j]=count;
					count++;
					if(count==0)
					{
						count++;
					}
					break Outer;
				}
			}
		}
	}
	public static void addHor(int ar[][])
	{
		Outer: for(int i=0;i<4;i++)
		{
			for(int j=0;j<3;j++)
			{
				if(ar[i][j]==0&&ar[i][j+1]==0)
				{
					System.out.println(i+1+" "+(j+1));
					ar[i][j]=count;
					ar[i][j+1]=count;
					count++;
					break Outer;
				}
			}
		}
	}
	public static void erase(int ar[][])
	{
		int row[]=new int[4];
		int col[]=new int[4];
		for(int i=0;i<4;i++)
		{
			int hCount=0,vCount=0;
			for(int j=0;j<4;j++)
			{
				if(ar[i][j]!=0)
				{
					hCount++;
				}
				if(ar[j][i]!=0)
				{
					vCount++;
				}
			}
			if(vCount==4)
			{
				col[i]=1;
			}
			if(hCount==4)
			{
				row[i]=1;
			}
		}
		for(int i=0;i<4;i++)
		{
			for(int j=0;j<4;j++)
			{
				if(row[i]==1)
				{
					ar[i][j]=0;
				}
				if(col[i]==1)
				{
					ar[j][i]=0;
				}
			}
		}
	}
}


import java.util.*;
public class Abc
{
	static int count=1;
	public static void main(String args[])
	{
		Scanner in=new Scanner(System.in);
		String s=in.next();
		int ar[][]=new int[4][4];
		//System.out.println(s.length());
		for(int i=0;i<s.length();i++)
		{
			char c=s.charAt(i);
			int initCount=count;
			if(c=='0')
			{
				addVer(ar);
			}
			else
			{
				addHor(ar);
			}
			erase(ar);
		}
		//System.out.println(count);
	}
	public static void print(int ar[][])
	{
		for(int i=0;i<4;i++)
		{
			for(int j=0;j<4;j++)
			{
				System.out.print(ar[i][j]+" ");
			}
			System.out.println();
		}
	}
	public static void addVer(int ar[][])
	{
		Outer: for(int i=0;i<1;i++)
		{
			for(int j=0;j<4;j++)
			{
				if(ar[i][j]==0&&ar[i+1][j]==0)
				{
					System.out.println(i+1+" "+(j+1));
					ar[i][j]=count;
					ar[i+1][j]=count;
					count++;
					if(count==0)
					{
						count++;
					}
					break Outer;
				}
			}
		}
	}
	public static void addHor(int ar[][])
	{
		Outer: for(int i=2;i<4;i++)
		{
			for(int j=0;j<3;j++)
			{
				if(ar[i][j]==0&&ar[i][j+1]==0)
				{
					System.out.println(i+1+" "+(j+1));
					ar[i][j]=count;
					ar[i][j+1]=count;
					count++;
					break Outer;
				}
			}
		}
	}
	public static void erase(int ar[][])
	{
		int row[]=new int[4];
		int col[]=new int[4];
		for(int i=0;i<4;i++)
		{
			int hCount=0,vCount=0;
			for(int j=0;j<4;j++)
			{
				if(ar[i][j]!=0)
				{
					hCount++;
				}
				if(ar[j][i]!=0)
				{
					vCount++;
				}
			}
			if(vCount==4)
			{
				col[i]=1;
			}
			if(hCount==4)
			{
				row[i]=1;
			}
		}
		for(int i=0;i<4;i++)
		{
			for(int j=0;j<4;j++)
			{
				if(row[i]==1)
				{
					ar[i][j]=0;
				}
				if(col[i]==1)
				{
					ar[j][i]=0;
				}
			}
		}
	}
}


import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

import static java.lang.Math.*;

public class Main implements Runnable {
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars==-1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        public int nextInt() {
            int c = read();

            while(isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if(c<'0'||c>'9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
                return res * sgn;
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
    public static void main(String args[]) throws Exception {
        new Thread(null, new Main(),"Main",1<<26).start();
    }

    String sortString(String inputString){
        char tempArray[] = inputString.toCharArray();
        Arrays.sort(tempArray);
        return new String(tempArray);
    }
    long factorial(int n){
        if (n == 0)return 1;
        else return ((long)(n * factorial(n-1)));
    }
    int gcd(int a,int b){
        if(b==0)return a;
        return gcd(b,a%b);
    }
    public void run() {
        InputReader sc = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        char s[]=sc.next().toCharArray();
        int c=0,k=0;
        for(int i=0;i<s.length;i++){
           if(s[i]=='0'){
               if(c==0){ c=1;out.println(1+" "+1);}
               else{ c=0;out.println(3+" "+1);}
           }
           else{
               if(k==0){ k=1;out.println(1+" "+3);}
               else if(k==1){ k=2;out.println(2+" "+3);}
               else if(k==2){ k=3;out.println(3+" "+3);}
               else{ k=0;out.println(4+" "+3);}
           }
        }

    out.close();
    }
}


import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

import static java.lang.Math.*;

public class Main implements Runnable {
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars==-1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        public int nextInt() {
            int c = read();

            while(isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if(c<'0'||c>'9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
                return res * sgn;
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
    public static void main(String args[]) throws Exception {
        new Thread(null, new Main(),"Main",1<<26).start();
    }

    String sortString(String inputString){
        char tempArray[] = inputString.toCharArray();
        Arrays.sort(tempArray);
        return new String(tempArray);
    }
    long factorial(int n){
        if (n == 0)return 1;
        else return ((long)(n * factorial(n-1)));
    }
    int gcd(int a,int b){
        if(b==0)return a;
        return gcd(b,a%b);
    }
    public void run() {
        InputReader sc = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        char s[]=sc.next().toCharArray();
        int c=0,k=0;
        for(int i=0;i<s.length;i++){
           if(s[i]=='0'){
               if(c==0){ c=1;out.println(1+" "+1);}
               else{ c=0;out.println(3+" "+1);}
           }
           else{
               if(k==0){ k=1;out.println(1+" "+3);}
               else if(k==2){ k=2;out.println(2+" "+3);}
               else if(k==3){ k=3;out.println(3+" "+3);}
               else{ k=0;out.println(4+" "+3);}
           }
        }

    out.close();
    }
}


// LM10: The next Ballon d'Or
import java.util.*;
import java.io.*;
import java.math.*;
public class Main
{
    static class FastReader
    {
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public FastReader() { this(System.in); }public FastReader(InputStream is) { mIs = is;}
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];}
        public String nextLine(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isEndOfLine(c));return res.toString() ;}
        public String next(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isSpaceChar(c));return res.toString();}
        public long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long res = 0; do{ if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read();}while(!isSpaceChar(c));return res * sgn;}
        public int i(){int c = read() ;while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }int res = 0;do{if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read() ;}while(!isSpaceChar(c));return res * sgn;}
        public double d() throws IOException {return Double.parseDouble(next()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; }
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; }
        public void scanIntArr(int [] arr){ for(int li=0;li<arr.length;++li){ arr[li]=i();}}
        public void scanLongArr(long [] arr){for (int i=0;i<arr.length;++i){arr[i]=l();}}
        public void shuffle(int [] arr){ for(int i=arr.length;i>0;--i) { int r=(int)(Math.random()*i); int temp=arr[i-1]; arr[i-1]=arr[r]; arr[r]=temp; } }
    }

    public static void main(String[] args)throws IOException {
        /*
inputCopy
010
outputCopy
1 1
1 2
1 4
        */
        PrintWriter pw = new PrintWriter(System.out);
        FastReader fr = new FastReader();
        char [] str=fr.nextLine().toCharArray();
        int [][] arr=new int[4][4];
        for(int i=0;i<str.length;++i)
        {
            char c=str[i];
            if(c=='0')
            {
                int x=-1,y=-1;
                for(int i2=0;i2<4;++i2)
                {
                    for(int j2=0;j2<4;++j2)
                    {
                        if(arr[i2][j2]==0 && i2+1<4 && arr[i2+1][j2]==0)
                        {
                            x=i2;
                            y=j2;
                            break;
                        }
                    }
                    if(x!=-1)
                        break;
                }
                arr[x][y]=1;
                arr[x+1][y]=1;
                if(arr[x][0]==1 && arr[x][1]==1 && arr[x][2]==1 && arr[x][3]==1)
                {
                    arr[x][0]=0;
                    arr[x][1]=0;
                    arr[x][2]=0;
                    arr[x][3]=0;
                }
                if(x+1<4 && arr[x+1][0]==1 && arr[x+1][1]==1 && arr[x+1][2]==1 && arr[x+1][3]==1)
                {
                    arr[x+1][0]=0;
                    arr[x+1][1]=0;
                    arr[x+1][2]=0;
                    arr[x+1][3]=0;
                }
                if(arr[0][y]==1 && arr[1][y]==1 && arr[2][y]==1 && arr[3][y]==1)
                {
                    arr[0][y]=0;
                    arr[1][y]=0;
                    arr[2][y]=0;
                    arr[3][y]=0;
                }
                pw.println((x+1)+" "+(y+1));

            }
            else
            {
                int x=-1,y=-1;
                for(int i2=0;i2<4;++i2)
                {
                    for(int j2=0;j2<4;++j2)
                    {
                        if(arr[i2][j2]==0 && j2+1<4 && arr[i2][j2+1]==0)
                        {
                            x=i2;
                            y=j2;
                            break;
                        }
                    }
                    if(x!=-1)
                        break;
                }
                arr[x][y]=1;
                arr[x][y+1]=1;

                if(arr[x][0]==1 && arr[x][1]==1 && arr[x][2]==1 && arr[x][3]==1)
                {
                    arr[x][0]=0;
                    arr[x][1]=0;
                    arr[x][2]=0;
                    arr[x][3]=0;
                }
                if(arr[0][y]==1 && arr[1][y]==1 && arr[2][y]==1 && arr[3][y]==1)
                {
                    arr[0][y]=0;
                    arr[1][y]=0;
                    arr[2][y]=0;
                    arr[3][y]=0;
                }
                if(y+1<4 && arr[0][y+1]==1 && arr[1][y+1]==1 && arr[2][y+1]==1 && arr[3][y+1]==1)
                {
                    arr[0][y+1]=0;
                    arr[1][y+1]=0;
                    arr[2][y+1]=0;
                    arr[3][y+1]=0;
                }
                pw.println((x+1)+" "+(y+1));
            }
        }
        pw.flush();
        pw.close();
    }
}


// LM10: The next Ballon d'Or
import java.util.*;
import java.io.*;
import java.math.*;
public class Main
{
    static class FastReader
    {
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public FastReader() { this(System.in); }public FastReader(InputStream is) { mIs = is;}
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];}
        public String nextLine(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isEndOfLine(c));return res.toString() ;}
        public String next(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isSpaceChar(c));return res.toString();}
        public long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long res = 0; do{ if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read();}while(!isSpaceChar(c));return res * sgn;}
        public int i(){int c = read() ;while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }int res = 0;do{if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read() ;}while(!isSpaceChar(c));return res * sgn;}
        public double d() throws IOException {return Double.parseDouble(next()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; }
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; }
        public void scanIntArr(int [] arr){ for(int li=0;li<arr.length;++li){ arr[li]=i();}}
        public void scanLongArr(long [] arr){for (int i=0;i<arr.length;++i){arr[i]=l();}}
        public void shuffle(int [] arr){ for(int i=arr.length;i>0;--i) { int r=(int)(Math.random()*i); int temp=arr[i-1]; arr[i-1]=arr[r]; arr[r]=temp; } }
    }

    public static void main(String[] args)throws IOException {
        /*
inputCopy
010
outputCopy
1 1
1 2
1 4

0001010100000110010100101010100101101111110000000000101010011011111111110100010101010101000010101010
        */
        PrintWriter pw = new PrintWriter(System.out);
        FastReader fr = new FastReader();
        char [] str=fr.nextLine().toCharArray();

        int [][] arr=new int[4][4];

        for(int i=0;i<str.length;++i)
        {
            char c=str[i];
            if(c=='0')
            {
                int x=-1;
                int y=-1;
                for(int j2=0;j2<4;++j2)
                {
                    if(arr[0][j2]==0)
                    {
                        x=0;
                        y=j2;
                        break;
                    }
                }
                arr[0][y]=1;
                arr[1][y]=1;
                pw.println((x+1)+" "+(y+1));
                if(y==3)
                {
                    arr[0][0]=0;
                    arr[0][1]=0;
                    arr[0][2]=0;
                    arr[0][3]=0;
                    arr[1][0]=0;
                    arr[1][1]=0;
                    arr[1][2]=0;
                    arr[1][3]=0;
                }
            }
            else
            {
                int x=-1;
                int y=-1;
                for(int j2=0;j2<4;++j2)
                {
                    if(arr[2][j2]==0)
                    {
                        x=2;
                        y=j2;
                        break;
                    }
                }
                arr[x][y]=1;
                arr[x][y+1]=1;
                pw.println((x+1)+" "+(y+1));
                if(y==2)
                {
                    arr[2][0]=0;
                    arr[2][1]=0;
                    arr[2][2]=0;
                    arr[2][3]=0;
                }
            }
        }
        pw.flush();
        pw.close();
    }
}


// LM10: The next Ballon d'Or
import java.util.*;
import java.io.*;
import java.math.*;
public class Main
{
    static class FastReader
    {
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public FastReader() { this(System.in); }public FastReader(InputStream is) { mIs = is;}
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];}
        public String nextLine(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isEndOfLine(c));return res.toString() ;}
        public String next(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isSpaceChar(c));return res.toString();}
        public long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long res = 0; do{ if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read();}while(!isSpaceChar(c));return res * sgn;}
        public int i(){int c = read() ;while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }int res = 0;do{if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read() ;}while(!isSpaceChar(c));return res * sgn;}
        public double d() throws IOException {return Double.parseDouble(next()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; }
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; }
        public void scanIntArr(int [] arr){ for(int li=0;li<arr.length;++li){ arr[li]=i();}}
        public void scanLongArr(long [] arr){for (int i=0;i<arr.length;++i){arr[i]=l();}}
        public void shuffle(int [] arr){ for(int i=arr.length;i>0;--i) { int r=(int)(Math.random()*i); int temp=arr[i-1]; arr[i-1]=arr[r]; arr[r]=temp; } }
    }

    public static void main(String[] args)throws IOException {
        /*
inputCopy
010
outputCopy
1 1
1 2
1 4
        */
        PrintWriter pw = new PrintWriter(System.out);
        FastReader fr = new FastReader();
        char [] str=fr.nextLine().toCharArray();
        int [][] arr=new int[4][4];
        for(int i=0;i<str.length;++i)
        {
            char c=str[i];
            if(c=='0')
            {
                int x=-1,y=-1;
                for(int i2=0;i2<4;++i2)
                {
                    for(int j2=0;j2<4;++j2)
                    {
                        if(arr[i2][j2]==0 && i2+1<4 && arr[i2+1][j2]==0)
                        {
                            x=i2;
                            y=j2;
                            break;
                        }
                    }
                    if(x!=-1)
                        break;
                }
                arr[x][y]=1;
                arr[x+1][y]=1;
                if(arr[x][0]==1 && arr[x][1]==1 && arr[x][2]==1 && arr[x][3]==1)
                {
                    arr[x][0]=0;
                    arr[x][1]=0;
                    arr[x][2]=0;
                    arr[x][3]=0;
                }
                if(arr[x+1][0]==1 && arr[x+1][1]==1 && arr[x+1][2]==1 && arr[x+1][3]==1)
                {
                    arr[x+1][0]=0;
                    arr[x+1][1]=0;
                    arr[x+1][2]=0;
                    arr[x+1][3]=0;
                }
                if(arr[0][y]==1 && arr[1][y]==1 && arr[2][y]==1 && arr[3][y]==1)
                {
                    arr[0][y]=0;
                    arr[1][y]=0;
                    arr[2][y]=0;
                    arr[3][y]=0;
                }
                pw.println((x+1)+" "+(y+1));

            }
            else
            {
                int x=-1,y=-1;
                for(int i2=0;i2<4;++i2)
                {
                    for(int j2=0;j2<4;++j2)
                    {
                        if(arr[i2][j2]==0 && j2+1<4 && arr[i2][j2+1]==0)
                        {
                            x=i2;
                            y=j2;
                            break;
                        }
                    }
                    if(x!=-1)
                        break;
                }
                arr[x][y]=1;
                arr[x][y+1]=1;

                if(arr[x][0]==1 && arr[x][1]==1 && arr[x][2]==1 && arr[x][3]==1)
                {
                    arr[x][0]=0;
                    arr[x][1]=0;
                    arr[x][2]=0;
                    arr[x][3]=0;
                }
                if(arr[0][y]==1 && arr[1][y]==1 && arr[2][y]==1 && arr[3][y]==1)
                {
                    arr[0][y]=0;
                    arr[1][y]=0;
                    arr[2][y]=0;
                    arr[3][y]=0;
                }
                if(arr[0][y+1]==1 && arr[1][y+1]==1 && arr[2][y+1]==1 && arr[3][y+1]==1)
                {
                    arr[0][y+1]=0;
                    arr[1][y+1]=0;
                    arr[2][y+1]=0;
                    arr[3][y+1]=0;
                }
                pw.println((x+1)+" "+(y+1));
            }
        }
        pw.flush();
        pw.close();
    }
}


import java.util.Scanner;

public class Ask3 {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		int board[][]=new int[4][4];
		boolean upLeftVer=false,downRightHor=false;
		for(int i=0;i<line.length();i++) {
			if(line.charAt(i)=='0') {
				if(!downRightHor) {
					downRightHor=true;
					System.out.println("4 3");
				}
				else {
					System.out.println("4 1");
					downRightHor=false;
				}
			}
			else {
				if(!upLeftVer) {
					upLeftVer=true;
					System.out.println("1 1");
				}
				else {
					upLeftVer=false;
					System.out.println("3 1");
				}
			}
		}
		sc.close();
	}
}


import java.util.Scanner;

public class Ask3 {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		int board[][]=new int[4][4];
		boolean upLeftVer=false,downRightHor=false;
		for(int i=0;i<line.length();i++) {
			if(line.charAt(i)=='1') {
				if(!downRightHor) {
					downRightHor=true;
					System.out.println("4 3");
				}
				else {
					System.out.println("4 1");
					downRightHor=false;
				}
			}
			else {
				if(!upLeftVer) {
					upLeftVer=true;
					System.out.println("1 1");
				}
				else {
					upLeftVer=false;
					System.out.println("3 1");
				}
			}
		}
		sc.close();
	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.util.ArrayDeque;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Liavontsi Brechka
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CIgraNaTablice solver = new CIgraNaTablice();
        solver.solve(1, in, out);
        out.close();
    }

    static class CIgraNaTablice {
        String s;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            s = in.next();
//        dp = new int[s.length()][1 << 17];

            ArrayDeque<CIgraNaTablice.Pos> stack = new ArrayDeque<>();
            check(0, 0, stack);

            StringBuilder res = new StringBuilder();
            while (!stack.isEmpty()) {
                CIgraNaTablice.Pos last = stack.pollLast();
                res.append(last.i + 1).append(' ').append(last.j + 1).append('\n');
            }

            out.print(res);
        }

        private boolean check(int index, int bitmask, ArrayDeque<CIgraNaTablice.Pos> stack) {
            if (index >= s.length()) {
                return true;
            }
//        if (dp[index][bitmask] != 0) return dp[index][bitmask] == 1;

            for (int i = 0; i < 4; i++) {
                boolean isOk = true;
                for (int j = 0; j < 4 && isOk; j++) {
                    if (((1 << (i * 4 + j)) & bitmask) == 0) isOk = false;
                }
                if (isOk) {
                    for (int j = 0; j < 4; j++) {
                        bitmask ^= (1 << (i * 4 + j));
                    }
                }
            }

            for (int i = 0; i < 4; i++) {
                boolean isOk = true;
                for (int j = 0; j < 4 && isOk; j++) {
                    if (((1 << (j * 4 + i)) & bitmask) == 0) isOk = false;
                }
                if (isOk) {
                    for (int j = 0; j < 4; j++) {
                        bitmask ^= (1 << (j * 4 + i));
                    }
                }
            }

            for (int i = 0; i < 4; i++) {
                for (int j = 0; j < 4; j++) {
                    char next = s.charAt(index);

                    if (next == '0') {
                        if (i * 4 + j + 4 < 16 &&
                                ((1 << (i * 4 + j)) & bitmask) == 0 &&
                                ((1 << (i * 4 + j + 4)) & bitmask) == 0) {
                            int prev = bitmask;
                            bitmask |= (1 << (i * 4 + j));
                            bitmask |= (1 << (i * 4 + j + 4));
                            stack.push(new CIgraNaTablice.Pos(i, j));

//                        dp[index][bitmask] = check(index + 1, bitmask, stack) ? 1 : -1;
//                        if (dp[index][bitmask] == 1) return true;
                            if (check(index + 1, bitmask, stack)) return true;

                            stack.poll();
                            bitmask = prev;
                        }
                    } else {
                        if (j < 3 &&
                                ((1 << (i * 4 + j)) & bitmask) == 0 &&
                                ((1 << (i * 4 + j + 1)) & bitmask) == 0) {
                            int prev = bitmask;
                            bitmask |= (1 << (i * 4 + j));
                            bitmask |= (1 << (i * 4 + j + 1));
                            stack.push(new CIgraNaTablice.Pos(i, j));

//                        dp[index][bitmask] = check(index + 1, bitmask, stack) ? 1 : -1;
//                        if (dp[index][bitmask] == 1) return true;
                            if (check(index + 1, bitmask, stack)) return true;

                            stack.poll();
                            bitmask = prev;
                        }
                    }
                }
            }

            return false;
        }

        static class Pos {
            int i;
            int j;

            public Pos(int i, int j) {
                this.i = i;
                this.j = j;
            }

        }

    }

    static class InputReader {
        private final BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                tokenizer = new StringTokenizer(readLine());
            }
            return tokenizer.nextToken();
        }

        public String readLine() {
            String line;
            try {
                line = reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }

    }
}