#include <cassert>
#include <cstdio>

#include <algorithm>

using namespace std;

int *x, *y;
bool yxless( const int &a, const int &b ) {
  if (x[a] != x[b])
    return x[a] < x[b];
  return y[a] < y[b];
}

int main() {
  assert(freopen("division.in", "r", stdin));
  assert(freopen("division.out", "w", stdout));

  int n;
  assert(scanf("%d", &n) == 1);
  int x[n], y[n], p[n];
  for (int i = 0; i < n; i++) {
    assert(scanf("%d%d", &x[i], &y[i]) == 2);
    p[i] = i;
  }
  
  ::x = x, ::y = y;
  sort(p, p + n, yxless);

  int rx[n], ry[n], kx = 0, ky = 0;
  for (int i = 0; i < n; i++) {
    if (i != 0 && x[p[i]] != x[p[i - 1]])
      rx[kx++] = x[p[i]];
    if (i != 0 && x[p[i]] == x[p[i - 1]])
      ry[ky++] = y[p[i]];
  }

  sort(rx, rx + kx);
  sort(ry, ry + ky);
  int cnt = 0;
  for (int i = 0; i < kx; i++)
    cnt += i == 0 || rx[i] != rx[i - 1];
  for (int i = 0; i < ky; i++)
    cnt += i == 0 || ry[i] != ry[i - 1];
  printf("%d\n", cnt);
  for (int i = 0; i < kx; i++)
    if (i == 0 || rx[i] != rx[i - 1])
      printf("x %d\n", rx[i]);
  for (int i = 0; i < ky; i++)
    if (i == 0 || ry[i] != ry[i - 1])
      printf("y %d\n", ry[i]);

  return 0;
}

