from math import gcd a,b,c = map(int,input().split()) X = int(input()) u = [a,b,c] u.append(gcd(a,b)) u.append(gcd(a,c)) u.append(gcd(c,b)) u.append(gcd(a,b,c)) # print(u) for t in u: if X%t == 0: print('Yes') exit() print('No')