import math A,B,C=map(int,input().split()) X=int(input()) g=math.gcd(A,B,C) if X%g==0: print('Yes') else: print('No')