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