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