May you help me pleas?
You are given a huge positive integer A. It is guaranteed that this number has no leading ZEROS. You can perform two types of operations using some given key value K (a positive integer): 1. You can add any multiple of K to A. (A = (A + K â X), whereX = 0, 1, 2, 3, 4, 5. . . . . .) 2. You can subtract any multiple of K from A. (A = (A â K â X), whereX = 0, 1, 2, 3, 4, 5. . . . . .) Your friend believes that the pair (A, K) is beautiful if you can make A become ZERO through performing the previous operations only. Find out if a given Pair (A, K) is beautiful pair or not. Input The first line contains a single integer T denoting the number of test cases. The first input line of each test case contains a huge Integer A (1 †|A| †105 ) where |A| is the length of the integer A. The second line contains an integer K (1 †K †109 ) denoting the key value. Output For each test case, print "YES"(without the quotes) if the pair (A, K) is beautiful. Otherwise, print "NO".