// Author: Ivan Kazmenko (gassa@mail.ru)
#define PROBLEM_VERSION_DIV1 1
#define PROBLEM_VERSION_DIV2 2
#define PROBLEM_VERSION PROBLEM_VERSION_DIV1
#include <set>
#include <string>
#include "testlib.h"

using namespace std;

int const MIN_N =  0;
int const MED_N =  2;
int const MAX_N =  3;
int const MIN_C =  2;
int const MAX_C = 10;
int const MED_A =  1;
int const MAX_A =  3;
#if PROBLEM_VERSION == PROBLEM_VERSION_DIV1
int const LIM_N = MAX_N;
int const LIM_A = MAX_A;
#else
int const LIM_N = MED_N;
int const LIM_A = MED_A;
#endif

int n;

struct coord
{
	int x, y;
	coord (int nx, int ny): x (nx), y (ny) {}
	bool operator < (coord const & other) const
	{
		if (x != other.x)
		{
			return x < other.x;
		}
		return y < other.y;
	}
};

int main (void)
{
	setName ("validator for problem \"revolving-lasers\"");

	registerValidation ();

	n = inf.readInt (MIN_N, LIM_N);
	inf.readEoln ();

	set <coord> s;
	for (int i = 0; i < n; i++)
	{
		int x = inf.readInt (MIN_C, MAX_C);
		ensure (x % 2 == 0);
		inf.readSpace ();
		int y = inf.readInt (MIN_C, MAX_C);
		ensure (y % 2 == 0);
		coord p = coord (x, y);
		ensure (s.find (p) == s.end ());
		s.insert (p);
		inf.readSpace ();
		inf.readInt (-LIM_A, +LIM_A);
		inf.readEoln ();
	} 

	inf.readEof ();

	return 0;
}
