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