a,b,c=map(int,input().split()) x=int(input()) l=[a,b,c] from functools import reduce from math import gcd def my_gcd(*numbers): return reduce(gcd,numbers) if x%my_gcd(*l)==0: print("Yes") else: print("No")