def main(): a, b = map(int, input().split()) for i in range(1, a + 1): if a % i == 0 and i % b == 0: print("YES") exit() print("NO") if __name__ == "__main__": main()