#K41272. Constructing a Rectangle

    ID: 26829 Type: Default 1000ms 256MiB

Constructing a Rectangle

Constructing a Rectangle

You are given an integer M representing an area. Your task is to determine whether it is possible to construct a rectangle with an area equal to \( M \) using two positive integers as its length and width. In other words, you need to check if there exist integers \( L \) and \( W \) such that \( L \times W = M \) with \( L \ge 1 \) and \( W \ge 1 \). Since every positive integer \( M \) satisfies \( M = 1 \times M \), the answer will always be YES for any \( M \ge 1 \>.

Input consists of multiple test cases. For each test case, output YES if a rectangle can be constructed, or NO otherwise.

Note: Given the constraints, the output is guaranteed to be YES for all valid inputs.

inputFormat

The first line of input contains a single integer ( T ), the number of test cases. The next line (or lines) contains ( T ) space-separated integers, where each integer ( M ) represents the area for a test case.

outputFormat

For each test case, output a single line containing YES if it is possible to construct a rectangle with area ( M ), or NO otherwise.## sample

1
7
YES

</p>