Logo
(追記) (追記ここまで)

31754번 - DiviDuelo 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB75393769.811%

문제

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

DiviDuelo is a new two-player, turn-based game. In DiviDuelo, a number $N$ is selected and the list of its divisors is written. For example, if $N = 10$ is selected, the list of numbers 1ドル,ドル 2ドル,ドル 5ドル,ドル 10ドル$ 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 $N,ドル 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 $N$ (1ドル ≤ N ≤ 10^{12}$) 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

힌트

출처

ICPC > Regionals > Latin America > Latin America Championship > The 2024 ICPC Latin America Championship D번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /