#include <iostream>
#include <fstream>
#include <stdlib.h>
using namespace std;


void main() {
	ifstream ifile;
	ofstream ofile;
	ofile.open("OUT1.txt",ios_base::out);
	ifile.open("DATA1.txt",ios_base::in);

	int d,m,y;
	for(int i=0; i<=4; i++) {
		d = 0;
		m = 0;
		y = 0; // init
		ifile>>d>>m>>y;
		if(y<1997) ofile<<"old enough\n";
		else if(y==1997 && m<10) ofile<<"old enough\n";
		else if(y==1997 && m==10 && d<=27) ofile<<"old enough\n";
		else ofile<<"too young\n";
	}

}
