Frame

No attempts yetTime limit5sMemory limit256 MB

Problem

Take an X×YX \times Y rectangle of unit cells and cut out the middle (X2)×(Y2)(X - 2) \times (Y - 2) rectangle. The figure that remains is a frame of size X×YX \times Y. A frame is a border one cell thick, so it has 2X+2Y42X + 2Y - 4 cells.

You have an unlimited supply of A×1A \times 1 tiles. A tile can be rotated by 90 degrees. Tiles must stay inside the frame and must not overlap. Decide whether the frame can be paved completely with these tiles. For example, a frame of size 5×65 \times 6 can be paved with 3×13 \times 1 tiles, but it cannot be paved with 4×14 \times 1 tiles.

Input

The first line contains two integers XX and YY (3X1063 \le X \le 10^6, 3Y1063 \le Y \le 10^6).

The second line contains an integer NN, the number of tile types to analyze (1N10001 \le N \le 1000).

Each of the next NN lines contains one integer. The integer on the KK-th of those lines is AKA_K (1AK1061 \le A_K \le 10^6).

Output

Print NN lines. The KK-th line contains YES if a frame of size X×YX \times Y can be paved with AK×1A_K \times 1 tiles, and NO if it cannot.