a,b,c=map(int,input().split()) x=int(input()) from math import gcd print(["No","Yes"][x%gcd(a,b,c)==0])