import random import time L = list(map(int, input().split())) LS = set() X = int(input()) stime = time.time() while stime+1.2 > time.time(): v1 = random.choice(L) v2 = random.choice(L) if X%v1==0 or X%v2==0: print('Yes') exit() else: v = max(v1,v2)%min(v1,v2) if v>0 and not v in LS: LS.add(v) L.append(v) print('No')