PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#SP0000022. Ước số lẻ lớn hơn một (Odd Divisor)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Ước số lẻ lớn hơn một (Odd Divisor)
Odd Divisor
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
Given an integer , determine whether it has an odd divisor , meaning is divisible by the odd integer . For instance, has odd divisor , but has no qualifying odd divisor. Report existence only; do not print the divisor.
Input
One line contains integer .
Output
Print YES if an odd divisor greater than exists, or NO otherwise.
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Examples
Input
6
Output
YES
Explanation
Since , the odd divisor exists. Print YES.
Input
4
Output
NO
Explanation
The positive divisors of are . The only odd one is , which is not allowed. Print NO.
Input
1099511627776
Output
NO
Explanation
Here , whose divisors are all powers of two. None is an odd integer greater than .