_, b = map(int, input().split()) ans = 'Yes' if 10**10000 % b else 'No' print(ans)