#P5497. [LnOI2019SP] 龟速单项式变换(SMT)
[LnOI2019SP] 龟速单项式变换(SMT)
Description
The following definition is given: if, in a positive integer sequence , there exists a sum of several consecutive positive integers that is a multiple of , then the positive integer sequence is called an “ sequence”.
Given and , you need to determine whether every positive integer sequence of length is an “ sequence”.
Input Format
Two numbers, and .
Output Format
If it holds, output YES; otherwise output NO.
2 4
NO
Hint
Sample explanation: there exists a counterexample .
Subtask 1 (50 pts): .
Subtask 2 (50 pts): .
Translated by ChatGPT 5
京公网安备 11011102002149号