-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCodeForces-1312A.py
More file actions
52 lines (46 loc) · 1.11 KB
/
CodeForces-1312A.py
File metadata and controls
52 lines (46 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from collections import *
from math import *
from heapq import *
from itertools import *
from queue import *
from cmath import *
from random import *
from functools import *
from time import *
import sys
import os
import decimal
def Seive(LIMIT):
T = int(sqrt(abs(LIMIT)))+1
primes = [True]*(T+1)
primes[0]=primes[1]=False
for i in range(2,T+1):
if primes[i]:
for q in range(i+i,LIMIT+1,i):
primes[q] = False
return [p for p in range(LIMIT) if primes[p]]
def prime(n):
factors = Seive(n)
possible = True
for x in factors:
if n%x == 0:
possible = False
break
return possible
def INPUTS():
#u,v,w = map(int,input().split())
n, k = map(int, input().split())
#t = int(input())
#s = input().strip()
#L = sorted(list(map(int, input().split())))
#H = list(map(int,input().split()))
return n,k
def solution():
n,m = INPUTS()
print('YES' if n%m == 0 else 'NO')
def main():
for _ in range(int(input())):
solution()
#solution()
if __name__ == '__main__':
main()