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