from math import gcd
A=[int(i) for i in input().split()]
x=int(input())

g=gcd(A[0],A[1])
g=gcd(g,A[2])

print("Yes") if x%g==0 else print("No")