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