#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <set>

using namespace std;

int main()
{
	ifstream cin("division.in");
	ofstream cout("division.out");
	int n;
	cin >> n;
	set<int> lineX, lineY;
	int x, y;
    for (int i = 0; i < n; i++)
    {
    	cin >> x >> y;
    	if (lineX.count(x)) lineY.insert(y);
    	else lineX.insert(x);
    }
    if (lineX.size() > 0) lineX.erase(*lineX.rbegin());
    if (lineY.size() > 0) lineY.erase(*lineY.rbegin());
    cout << lineX.size() + lineY.size() << "\n";
    for (set<int>::iterator it = lineX.begin(); it != lineX.end(); it++)
    	cout << "x " << *it + 1<< "\n";
    	  	
    for (set<int>::iterator it = lineY.begin(); it != lineY.end(); it++)
    	cout << "y " << *it + 1<< "\n";
    
}
