x,a,y,b = map(int,input().split()) if (x**a) % (y**b) == 0: print("Yes") else: print("No")