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