https://codeforces.com/gym/580226/problem/E

#include<bits/stdc++.h>
#define lc p<<1
#define rc p<<1|1
#define INF 2e9
using namespace std;

#define endl '\n'
using ll = long long;
using pii = pair<ll, ll>;
const double PI = acos(-1);
const int N=2e5+10;
void solve(){
	string s;cin>>s;
	int p0=1,p1=1;
	for(int i=0;i<s.length();i++){
		if(s[i]=='0'){
			cout<<1<<" "<<p0<<endl;
			p0++;
			if(p0==5) p0=1;
		}
		else {
			cout<<3<<" "<<p1<<endl;
			p1+=2;
			if(p1==5) p1=1;
		}
	}
	
}


int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr), cout.tie(nullptr);
	
	int T = 1;
//	cin>>T;
	while (T--) {
		solve();
	}
	
	return 0;
}