// The "Question1" class.
import java.io.*;

public class Question1
{
    public static void main (String [] args) throws IOException
    {
	BufferedReader meh = new BufferedReader (new FileReader ("DATA1.txt"));
	PrintWriter duck = new PrintWriter (new FileWriter ("OUT1.txt"));
	String line;
	for (int i = 0 ; i < 5 ; i++)
	{
	    line = meh.readLine ();
	    String datas [] = line.split (" ");

	    if (Integer.parseInt (datas [2]) < 1997)
	    {
		if (i == 4)
		    duck.print ("old enough");
		else
		    duck.println ("old enough");
	    }
	    else
	    {
		if (Integer.parseInt (datas [2]) > 1997)
		{
		    if (i == 4)
			duck.print ("too young");
		    else
			duck.println ("too young");
		}
		else
		{
		    if (Integer.parseInt (datas [1]) < 10)
		    {
			if (i == 4)
			    duck.print ("old enough");
			else
			    duck.println ("old enough");
		    }
		    else
		    {
			if (Integer.parseInt (datas [1]) > 10)
			{
			    if (i == 4)
				duck.print ("too young");
			    else
				duck.println ("too young");
			}
			else
			{
			    if (Integer.parseInt (datas [0]) < 27)
			    {
				if (i == 4)
				    duck.print ("old enough");
				else
				    duck.println ("old enough");
			    }
			    else
			    {
				if (Integer.parseInt (datas [0]) > 27)
				{
				    if (i == 4)
					duck.print ("too young");
				    else
					duck.println ("too young");
				}
				else
				{
				    if (i == 4)
					duck.print ("old enough");
				    else
					duck.println ("old enough");
				}

			    }
			}
		    }
		}
	    }
	} // main method
	duck.close ();
    } // Question1 class
}



