x,a,y,b = map(int,input().split()) dx = dict() dy = dict() C = 10 ** 6 dat = [0] * C for i in range(2,C): if dat[i] == 0: for j in range(2 * i,C,i): dat[j] = 1 if x % i == 0: x //= i count = 1 while x % i == 0: x //= i count += 1 dx[i] = count if y % i == 0: y //= i count = 1 while y % i == 0: y //= i count += 1 dy[i] = count if x != 1: dx[x] = 1 if y != 1: dy[y] = 1 import sys for p in dy: c = dy[p] * b if p not in dx: print('No') exit() cc = dx[p] * a if cc < c: print('No') exit() print('Yes')