import sys, math sys.setrecursionlimit(1000000) INF = 1 << 100 mod = 1000000007 #mod = 998244353 input = lambda: sys.stdin.readline().rstrip() li = lambda: list(map(int, input().split())) A = li() X = int(input()) ans = 'No' g = math.gcd(math.gcd(A[0], A[1]), A[2]) if X % g == 0: ans = 'Yes' print(ans)