#K72892. Candy Distribution

    ID: 33854 Type: Default 1000ms 256MiB

Candy Distribution

Candy Distribution

You are given a number of test cases. In each test case, you are provided with two integers: the number of candies and the number of children. Your task is to determine whether the candies can be distributed equally among the children with no remainder. If they can be distributed equally, print YES; otherwise, print NO.

Note that each test case is independent. Ensure your solution reads input from standard input and writes the answer to standard output.

inputFormat

The first line of input contains a single integer T, representing the number of test cases. Each of the following T lines contains two space-separated integers: candies and children.

Constraints:

  • 1 ≤ T ≤ 10^5
  • 0 ≤ candies ≤ 10^9
  • 1 ≤ children ≤ 10^9

It is guaranteed that the number of children is at least 1.

outputFormat

For each test case, output a single line containing YES if the candies can be evenly distributed among the children, otherwise output NO.## sample

4
10 2
5 3
12 4
9 3
YES

NO YES YES

</p>