O. South Korean Unlimited Fighting Championship——南韩无限制格斗大赛

    传统题 1000ms 256MiB

South Korean Unlimited Fighting Championship——南韩无限制格斗大赛

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Statement

In South Korea, there's a prestigious competition called the South Korean Unlimited Fighting Tournament. This game always has a winner, never a draw.

Three players, Chun Doo-hwan, Park Geun-hye, and Yoon Seok-yeol, all wanted to spend the rest of their lives fighting. They decided to play an unlimited tournament according to the following rules:

  • In each match, two players compete against each other, with the third player serving as a spectator.
  • To ensure fairness, no player can participate in three consecutive matches. If a player participates in two consecutive matches, they must remain a spectator in the next match, with two other players competing against them. Otherwise, the winner will play against the spectator in the next match, and the loser will become a spectator.

Now, the players, fully immersed in this infinite loop of games, ask you to solve the following problem: given an integer kk, determine whether a spectator of the first game is likely to become a spectator again in the kkth game.

Input

Each test case has only one line, containing an integer kk (1k1091\leq k\leq10^9).

Output

If a spectator of the first game is likely to become a spectator of the kkth game, then output "Yes" (without quotes); otherwise, output "No" (without quotes).

Samples

1
Yes
2
No
1000000000
Yes

Notes

In the first test case, spectators of the first game are already spectators of the first game.

In the second test case, spectators of the first game will participate in the second game regardless of the outcome of the first game.

2025 JSUT Collegiate Programming Contest 江苏理工学院新生赛-同步赛

未参加
状态
已结束
规则
ACM/ICPC
题目
15
开始于
2025-11-8 12:00
结束于
2025-11-8 17:00
持续时间
5 小时
主持人
参赛人数
15