/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//package dwite;

import java.io.FileReader;
import java.io.FileWriter;
import java.util.Scanner;

/**
 *
 * @author ianlo
 */
public class Dwite {

    public static void main(String args[]) {
        try {
            FileReader inFile = new FileReader("DATA1.txt");
            FileWriter outFile = new FileWriter("OUT1.txt");
            Scanner scanner = new Scanner(inFile);
            for (int i = 0; i < 5; i++) {
                int day = scanner.nextInt();
                int month = scanner.nextInt();
                int year = scanner.nextInt();
                if (2010 - year > 13) {
                    outFile.write("old enough\r\n");


                } else if (2010 - year == 13 && 10 - month > 0) {
                    outFile.write("old enough\r\n");
                    
                } else if (2010 - year == 13 && 10 - month == 0 && 27-day>=0) {
                    outFile.write("old enough\r\n");
                } else {
                    outFile.write("too young\r\n");


                }
            }
            inFile.close();
            outFile.close();
        } catch (Exception e) {
            e.printStackTrace();

        }
    }
}

