#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;
	vector<pair<int, int> > points(n);
    for (int i = 0; i < n; i++)
    	cin >> points[i].first >> points[i].second;
   	sort(points.begin(), points.end());
    
    for (int i = 0; i < n - 1; i++)
    	if (points[i].first == points[i + 1].first) lineY.insert(points[i].second);
    	else lineX.insert(points[i].first);

    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";

}
