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

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

/**
 *
 * @author georgemavroidis
 */
public class DwiteFeb {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        FileReader inFile = new FileReader("DATA1.txt");
        FileWriter outFile = new FileWriter("OUT1.TXT");
        Scanner scan = new Scanner(inFile);
        int mday = 27;
        int mmonth = 10;
        int myear = 2010;

        for (int i = 0; i < 5; i++) {
            int day = scan.nextInt();
            int month = scan.nextInt();
            int year = scan.nextInt();
            if ((((myear - year) <= 13) && ((mmonth - month) >= 0)) && ((mday - day) >= 0)) {
                outFile.write("old enough\n");
            } else {
                outFile.write("too young\n");;
            }

            // TODO code application logic here
        }
        inFile.close();
        outFile.close();
    }
}

