from math import gcd A,B,C=map(int,input().split()) X=int(input()) if X%gcd(gcd(A,B),C): print("No") else: print("Yes")