def pow_k(x, n): if n == 0: return 1 K = 1 while n > 1: if n % 2 != 0: K *= x x *= x n //= 2 return K * x x,a,y,b=map(int,input().split()) n=pow(x,a) if pow_k(x,a)%pow_k(y,b)==0: print("Yes") else: print("No")