SP7217 TRIKA - Training for final
Description
Abotrika is a famous player who plays in a good team. His team is going to play the final match next week and he have to train hard because all his fans are expecting that Abotrika will score more than one goal, so his team-mates suggested helping him in training given that Abotrika will play alone against all his friends in the training.
Input Format
Given two integers N,M (length and width of the training court) 2
Output Format
The output must be one line either "N" or "Y" then the maximum power "Abotrika can get when he pass from his friends to reach the (the goal who is at the cell P\[N\]\[M\] in the court ).
**NOTE**: Abotrika's power decreases by the power of his team-mate whom Aboutrika succeeded to get through on his way to score a goal. "Y" means that he had scored a goal with power at least 0 and "N" if he couldn't reach the goal with zero power at least. Also, Abotrika can only move in two directions -- right and down -- to reach the goal.