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