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