MOD = 10 ** 9 + 7 INF = 10 ** 12 import sys sys.setrecursionlimit(1000000) dy = (-1,0,1,0) dx = (0,1,0,-1) from itertools import permutations from math import gcd def main(): a,b = map(int,input().split()) ans = 'NO' for i in range(1,a + 1): if a%i == 0: if i%b == 0: ans = 'YES' break print(ans) if __name__ =='__main__': main()