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