#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const int N = 2e6;
const long long mod = 1e9 + 7;
long long b[N], vis[5][5], po[N], num[N], t, n, m, x, y, k, a[N];
long long ex, ey, cnt, ans, sum, flag;
long long hs[N];
long long dp[N];
long long row[5], col[5];
vector<int> v[N];
map<int, int> mp;
priority_queue<pair<int, int> > q;
priority_queue<pair<int, int> > tq;
string s;
void check(int x1, int x2, int y) {
  if (k == 1) {
    if (row[x1] == 4) {
      row[x1] = 0;
      vis[x1][1] = vis[x1][2] = vis[x1][3] = vis[x1][4] = 0;
      col[1]--;
      col[2]--;
      col[3]--;
      col[4]--;
    }
    if (row[x2] == 4) {
      row[x2] = 0;
      vis[x2][1] = vis[x2][2] = vis[x2][3] = vis[x2][4] = 0;
      col[1]--;
      col[2]--;
      col[3]--;
      col[4]--;
    }
    if (col[y] == 4) {
      col[y] = 0;
      vis[1][y] = vis[2][y] = vis[3][y] = vis[4][y] = 0;
      row[1]--;
      row[2]--;
      row[3]--;
      row[4]--;
    }
  } else {
    if (col[y] == 4) {
      col[y] = 0;
      vis[1][y] = vis[2][y] = vis[3][y] = vis[4][y] = 0;
      row[1]--;
      row[2]--;
      row[3]--;
      row[4]--;
    }
    if (row[x1] == 4) {
      row[x1] = 0;
      vis[x1][1] = vis[x1][2] = vis[x1][3] = vis[x1][4] = 0;
      col[1]--;
      col[2]--;
      col[3]--;
      col[4]--;
    }
    if (row[x2] == 4) {
      row[x2] = 0;
      vis[x2][1] = vis[x2][2] = vis[x2][3] = vis[x2][4] = 0;
      col[1]--;
      col[2]--;
      col[3]--;
      col[4]--;
    }
  }
}
void ccheck(int x, int y1, int y2) {
  if (k == 1) {
    if (row[x] == 4) {
      row[x] = 0;
      vis[x][1] = vis[x][2] = vis[x][3] = vis[x][4] = 0;
      col[1]--;
      col[2]--;
      col[3]--;
      col[4]--;
    }
    if (col[y1] == 4) {
      col[y1] = 0;
      vis[1][y1] = vis[2][y1] = vis[3][y1] = vis[4][y1] = 0;
      row[1]--;
      row[2]--;
      row[3]--;
      row[4]--;
    }
    if (col[y2] == 4) {
      col[y2] = 0;
      vis[1][y2] = vis[2][y2] = vis[3][y2] = vis[4][y2] = 0;
      row[1]--;
      row[2]--;
      row[3]--;
      row[4]--;
    }
  } else {
    if (col[y1] == 4) {
      col[y1] = 0;
      vis[1][y1] = vis[2][y1] = vis[3][y1] = vis[4][y1] = 0;
      row[1]--;
      row[2]--;
      row[3]--;
      row[4]--;
    }
    if (col[y2] == 4) {
      col[y2] = 0;
      vis[1][y2] = vis[2][y2] = vis[3][y2] = vis[4][y2] = 0;
      row[1]--;
      row[2]--;
      row[3]--;
      row[4]--;
    }
    if (row[x] == 4) {
      row[x] = 0;
      vis[x][1] = vis[x][2] = vis[x][3] = vis[x][4] = 0;
      col[1]--;
      col[2]--;
      col[3]--;
      col[4]--;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> s;
  for (int i = 0; s[i]; i++) {
    if (s[i + 1] == '1')
      k = 1;
    else
      k = 0;
    if (s[i] == '0') {
      int flag = 0;
      ;
      for (int y = 1; y <= 4; y++) {
        for (int x = 1; x <= 3; x++) {
          if (!vis[x][y] && !vis[x + 1][y]) {
            cout << x << " " << y << endl;
            ;
            vis[x][y] = 1;
            vis[x + 1][y] = 1;
            row[x]++;
            row[x + 1]++;
            col[y] += 2;
            check(x, x + 1, y);
            flag = 1;
            break;
          }
        }
        if (flag) break;
      }
    } else {
      int flag = 0;
      for (int x = 1; x <= 4; x++) {
        for (int y = 1; y <= 3; y++) {
          if (!vis[x][y] && !vis[x][y + 1]) {
            cout << x << " " << y << endl;
            ;
            vis[x][y] = 1;
            vis[x][y + 1] = 1;
            row[x] += 2;
            col[y]++;
            col[y + 1]++;
            ccheck(x, y, y + 1);
            flag = 1;
            break;
          }
        }
        if (flag) break;
      }
    }
  }
}
