import math abc = list(map(int, input().split())) x = int(input()) gcd = math.gcd(*abc) if x % gcd == 0: print("Yes") else: print("No")