


#include <iostream>
#include <fstream>
#include <string>

using namespace std;

void old();
void young();

void old()	{
	cout << "old enough" << endl;
}

void young()	{
	cout << "yuoung enough" << endl;
}


int main()	{
	ifstream in;
	ofstream out;
	string result[5];

	int day[5];
	int month[5];
	int year[5];

	in.open("DATA1.txt");

	for (int i = 0; i < 5; i++)	{
		in >> day[i] >> month[i] >> year[i];
	}
	in.close();

	for (int i = 0; i < 5; i++)	{
		if (year[i] < 1997)	{
			result[i] = "old enough";
		}
		else if (year[i] > 1997)	{
			result[i] = "too young";
		}
		else	{
			if (month[i] < 10)	{
				result[i] = "old enough";
			}
			else if (month[i] > 10)	{
				result[i] = "too young";
			}
			else	{
				if (day[i] <= 27)	{
					result[i] = "old enough";
				}
				else if (day[i] > 27)	{
					result[i] = "too young";
				}
			}
		}
	}
	

	out.open("OUT1.txt");
	for (int i = 0; i < 5; i++)
		out << result[i] << endl;
	out.close();

	return 0;
}

