#include <bits/stdc++.h>
template <class T>
inline void read(T &x) {
  int f = 1, c;
  while (!isdigit(c = getchar()))
    if (c == '-') f = -1;
  x = c - '0';
  while (isdigit(c = getchar())) {
    x = x * 10 + c - '0';
  }
  x *= f;
}
using LL = long long;
std::vector<std::pair<int, int>> ret[2];
char s[2333];
int main() {
  ret[0] = {{1, 1}, {3, 1}};
  ret[1] = {{1, 3}, {2, 3}, {3, 3}, {4, 3}};
  int cnt[2] = {0, 0};
  scanf("%s", s);
  int n = strlen(s);
  for (int i = 0; i < n; ++i) {
    int x = s[i] - '0';
    int y = cnt[x]++ % ret[x].size();
    printf("%d %d\n", ret[x][y].first, ret[x][y].second);
  }
}
