Welcome to the contest with open arms , and hope you enjoy
You are given a 2 \times 2 matrix. You may rotate the matrix by 90^\circ clockwise any number of times (including zero times). Your task is to determine whether it is possible to obtain a matrix whose value is exactly equal to a given integer .
A 2 \times 2 matrix has the form
where , , , and are integers.
The value of this matrix is defined as a \times d- b \times c.
The first line contains a single integer (1 \le t \le 10^4) — the number of test cases.
The first line of each test case contains a single integer (1 \le x \le 10^9) — the target value.
The next two lines represent the matrix a,b,c,d (1 \le a,b,c,d \le 10^4) — the matrix integers.
For each test case, print "YES" if possible; otherwise, print "NO".
You can output the answer in any case (For example, the strings "yEs", "yes", "Yes", and "YeS" will be recognized as positive responses).
Example 1
In the first test case, the matrix is
After rotating it once by 90^\circ clockwise, we obtain
Its value becomes
which equals the required .
In the fourth test case, start with
After three clockwise rotations:
The value of the final matrix is
Subtask ( points) : No additional constraints