Problem E

Statement
Copy Copied
Powers Of Two

Given n integers, determine whether any pair sums to a power of two. Output YES if such a pair exists, otherwise NO.

Input: n and n integers.
Output: YES or NO.