Check the bit
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given a natural number n.
Your task is to determine if the i-th digit from the right in its binary representation is a one. Bits are counted starting from one.
Input
The input consists of two numbers: n ≤ 10^9, i ≤ 32.
Output
The output should be "YES" if the i-th digit is one, and "NO" otherwise.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 36%