3395. Division

Description

Here are two positive integers  given in decimal form.

In one time of operation, you can remove one digit of , but after the operation, must be a non-negative integer without leading zeroes. 

By the way, you are forbidden to rearrange the digits.

If it is possible to make  divisible by  after several operations(possibly zero), print "YES"(without quotes), otherwise, print"NO"(without quotes).

Input

Each test contains multiple test cases. The first line contains the number of test cases .

Each test case contains a single line with two positive integers 

Output

For each test case, output your answer "YES" or "NO"(without quotes) in a line.

Sample Input

2

233 3

111 8

Sample Output

YES

NO

 

 


难度等级: 0
总通过次数: 5
总提交次数: 171