logo AlgoBeat OnlineJudge
登录 注册

#215250. [ICPC 2024 LAC] DiviDuelo

内存限制:1024 MiB 时间限制:500 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

The Intense Challenges Players Club (ICPC) is hosting a DiviDuelo tournament.

DiviDuelo is a new two-player, turn-based game. In DiviDuelo, a number is selected and the list of its divisors is written. For example, if is selected, the list of numbers is written. Players alternate turns picking one still unpicked divisor from the list each turn, until all divisors have been picked.

The winner is determined by the greatest common divisor (GCD) of the numbers picked by the starting player. If the GCD is not equal to 1, the starting player wins. Otherwise, if the GCD is equal to 1, the other player wins.

The ICPC needs your help to prepare some statistics about the games played in the tournament. Given the value of , determine if the starting player can win the game assuming both players play optimally.

输入格式

The input consists of a single line that contains an integer () indicating the number selected for the game.

输出格式

Output a single line with the uppercase letter "Y" if the starting player can win the game and the uppercase letter "N" otherwise, assuming both players play optimally.

样例

样例输入 1

10

样例输出 1

Y

样例输入 2

9

样例输出 2

N

样例输入 3

1

样例输出 3

N