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