Problem - 1647D - Codeforces
Problem - 1647D - Codeforces
|
stdfloat | Logout
HOME TOP CATALOG CONTESTS GYM PROBLEMSET GROUPS RATING EDU API CALENDAR HELP
Madoka is going to enroll in "TSUNS PTU". But she stumbled upon a difficult task during the → Virtual participation
entrance computer science exam:
Output
For each set of input data, output "NO" if the number cannot be represented in at least two
ways. Otherwise, output "YES".
You can output each letter in any case (for example, "YES", "Yes", "yes", "yEs", "yEs" will
be recognized as a positive answer).
Example
input Copy
8
6 2
12 2
36 2
8 2
1000 10
2376 6
128 4
16384 4
output Copy
NO
NO
YES
NO
YES
YES
NO
YES
https://codeforces.com/problemset/problem/1647/D 1/2
2/20/24, 9:36 PM Problem - 1647D - Codeforces
Note
In the first example, 6 can be represented as 6, 1 ⋅ 6 , 2 ⋅ 3 . But 3 and 1 are not a good
numbers because they are not divisible by 2, so there is only one way.
Supported by
https://codeforces.com/problemset/problem/1647/D 2/2