from math import gcd a,b,c=map(int,input().split()) X=int(input()) bc = gcd(b,c) abc = gcd(a,bc) if abc!=1 and X%abc != 0: print("No") else: print("Yes")