a,b,c = map(int,input().split()) x = int(input()) def gcd(a,b): while True: r =a % b a = b b = r if r == 0: return a d = gcd(a,b) d = gcd(d,c) if x % d == 0: print('Yes') else: print('No')