from math import gcd A,B,C = list(map(int,input().split())) X = int(input()) print("Yes" if X%gcd(A,B,C) == 0 else "No")