from collections import * from functools import * from itertools import * from heapq import * import sys,math input = sys.stdin.readline a,b,c = map(int,input().split()) X = int(input()) g = a g = math.gcd(g,b) g = math.gcd(g,c) if X%g==0: print('Yes') else: print('No')