Dr. Zora's Algorithm
Easy Accuracy: 21.24% Submissions: 902 Points: 2

Dr. Zora built an algorithm to set the destructive or danger year,  his algorithm contains a pattern of years which were set by Hydra for attacks. As the Avengers needs to be ready mentally as well as physically. Agent Natalia Romanoff is assigned the task to detect the pattern of the selection of destruction year, and help Avengers. Agent Romanoff observes from the past details that, year ........,1824, 1842, 1848, 1860........, 1912, 1918, ......2012 were Destructive Years. Now observing the pattern Agent Romanoff needs to design an algorithm to determine future Destructive Years. Help her!     

Input:
The First line of input contains a single integer T, i.e the number of test cases.Each test contains a single integer i.e  Year.

Output:
For each test case, output on a separate line: "Destructive Year" if the year is destructive and "Non-Destructive Year" if it is not.

Constraints:
1 ≤ T ≤ 100

200 ≤ Year ≤ 9999

Example:
Input :

6
1848
1912
1972
1973
2018
2054
Output:
Destructive Year
Destructive Year
Destructive Year
Non-Destructive Year
Destructive Year
Destructive Year

 

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.