405031: GYM101744 I MaratonIME goes to a japanese restaurant

Memory Limit:64 MB Time Limit:6 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

I. MaratonIME goes to a japanese restauranttime limit per test6 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputMatsu?Member, MaratonIME's

Nathan and Yan are very dedicated programmers. They apply their knowledge in algorithms in problems beyond the programming competitions themselves, optimizing even the most trivial every day things.

Some question if they aren't just crazy, and if it wouldn't be better to just do what has to be done.

Anyhow, eventually some conflicts happen when their approaches differ about what has to be done. That always happens when they decide to go to japanese restaurants.

Everybody knows that the objective in an all-you-can eat it to try to eat many distinct kinds of food. Nathan and Yan differ in opinions on how to achieve that. Both competitors, when sitting to eat an asian delicacy, eat until nothing is left on their plates.

The difference is that Yan, respecting the wisdom of the nipponic masters, eats in the order the food arrives, whereas Nathan claims that the food is better the latter it arrives, to spare the most expensive ingredients, and so asks that his plates come in inverted order.

Given the default order the dishes will arrive and the time Nathan and Yan will stay at the restaurant, determine who is going to eat the most different kinds of food, or if both ate the same number of different kinds of food, given that Yan eats the food in order and Nathan in inverted order.

Input

The first line of input has two integers: 0 < n ≤ 105, how many plates will be served and 0 < T ≤ 106, how long (in minutes) Yan and Nathan will stay at the restaurant.

In the following line, n integers 0 < ti ≤ 103, ti is how long it takes to eat the i-th dish (in minutes).

The restaurants are very well administrated, so you can assume that when one of the competitors finishes his dish, the following dish is already on the table.

Output

If Yan is going to taste more dishes than Nathan, print "Yan". If Nathan is going to taste more dishes than Yan, print "Nathan". Otherwise, if we have a tie, print "Empate".

ExamplesInput
10 45
1 2 3 4 5 6 7 8 9 10
Output
Yan
Input
10 45
10 2 3 4 5 6 7 8 9 1
Output
Nathan

加入题单

上一题 下一题 算法标签: