import math a, b, c = map(int, input().split()) X = int(input()) # Calculate the GCD of a, b, and c gcd_ab = math.gcd(a, b) gcd_abc = math.gcd(gcd_ab, c) # Check if X is divisible by gcd_abc if X % gcd_abc == 0: print("Yes") else: print("No")