Zola's Algorithm

0

0 votes
Easy
Problem

Dr. Zola 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 were Destructive Years. Now observing the pattern Agent Romanoff needs to design an algorithm to determine future Destructive Years. Help her !

Sample 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


Input :

6
1848
1912
1972
1973
2018
2054


Output:

Destructive Year
Destructive Year
Destructive Year
Non-Destructive Year
Destructive Year
Destructive Year

Sample Input
6
1848
1912
1972
1973
2018
2054
Sample Output
Destructive Year
Destructive Year
Destructive Year
Non-Destructive Year
Destructive Year
Destructive Year
Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?