Take an X×Y rectangle of unit cells and cut out the middle (X−2)×(Y−2) rectangle. The figure that remains is a frame of size X×Y. A frame is a border one cell thick, so it has 2X+2Y−4 cells.
You have an unlimited supply of A×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×6 can be paved with 3×1 tiles, but it cannot be paved with 4×1 tiles.
The first line contains two integers X and Y (3≤X≤106, 3≤Y≤106).
The second line contains an integer N, the number of tile types to analyze (1≤N≤1000).
Each of the next N lines contains one integer. The integer on the K-th of those lines is AK (1≤AK≤106).
Print N lines. The K-th line contains YES if a frame of size X×Y can be paved with AK×1 tiles, and NO if it cannot.