import math x,a,y,b=map(int,input().split()) if math.gcd(x,y)==1: if a%b==0 or b%a==0: print("Yes") else : print("No") else: print("No")