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