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

public class division_vd {

	class Point implements Comparable<Point> {
		int x, y;

		public Point(int x, int y) {
			super();
			this.x = x;
			this.y = y;
		}

		public int compareTo(Point o) {
			if (x == o.x) {
				return y - o.y;
			} else {
				return x - o.x;
			}
		}
	}

	public void solve() throws IOException {
		int n = nextInt();
		Point[] a = new Point[n];
		for (int i = 0; i < n; i++) {
			a[i] = new Point(nextInt(), nextInt());
		}
		HashSet<Integer> ySet = new HashSet<>();
		ArrayList<String> result = new ArrayList<>();
		Arrays.sort(a);
		for (int i = 1; i < n; i++) {
			if (a[i].x == a[i - 1].x) {
				if (!ySet.contains(a[i].y)) {
					ySet.add(a[i].y);
					result.add("y" + " " + a[i].y);
				}
			} else {
				result.add("x" + " " + a[i].x);
			}
		}
		out.println(result.size());
		for (String s : result) {
			out.println(s);
		}
	}

	final String fileName = "division_vd_".split("_")[0];

	public void run() throws IOException {
		br = new BufferedReader(new FileReader(fileName + ".in"));
		out = new PrintWriter(fileName + ".out");
		solve();
		out.close();
		br.close();
	}

	public static void main(String[] args) throws IOException {
		new division_vd().run();
	}

	BufferedReader br;
	StringTokenizer str;
	PrintWriter out;

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

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

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

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

}
