import math a, b, c=map(int,input().split(" ")) if int(input()) % math.gcd(math.gcd(a, b), c) == 0: print("Yes") else: print("No")