問題一覧 > 通常問題

No.1465 Archaea

レベル : / AI推定難易度 : 450 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 170
作問者 : wolgnik / テスター : Kanten4205
お気に入りにしたユーザー ProblemId : 4837 / 自分の提出
問題文最終更新日: 2021-04-10 00:19:52
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 289 (Kanten4205’s Birthday Contest) (順位表) の他の問題:

Problem Statement

The highly anticipated and hugely popular smartphone game "Archaea" was released just the other day.
"Archaea" is a hyper-sensory rhythm breeding game in which you multiply bacteria by tapping the screen in rhythm. In the initial state of the game, there is only 1 bacterium. You may perform the following 2 types of operations up to $K$ times in total. It is also possible to perform no operations at all.
・Multiply the bacteria. The number of bacteria doubles. That is, for example, if you multiply the bacteria when there are $M$ of them ($M$ is a positive integer), the number of bacteria becomes $2M$.
・Bring in bacteria. The number of bacteria increases by 3. That is, for example, if you bring in bacteria when there are $M$ of them ($M$ is a positive integer), the number of bacteria becomes $M+3$.
Print YES if the number of bacteria can finally be made $N$ by performing operations up to $K$ times from the initial state, and NO otherwise.

Input

$N\ K$

$1 \leq N, K \leq 2 \times 10^5$
All inputs are integers.
All test cases satisfy these constraints.

Output

Print YES if the number of bacteria can finally be made $N$, and NO otherwise, on one line. Also, print a newline at the end.

Sample

Sample 1
Input
14 5
Output
YES

For example, you can multiply the bacteria 3 times and then bring in bacteria 2 times.

Sample 2
Input
6 1
Output
NO

Sample 3
Input
777 777
Output
NO

Sample 4
Input
131 8
Output
YES

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。