import math def factorize(n): d = {} temp = int(math.sqrt(n))+1 for i in range(2, temp): while n%i== 0: n //= i if i in d: d[i] += 1 else: d[i] = 1 if d == {}: d[n] = 1 else: if n in d: d[n] += 1 elif n != 1: d[n] =1 return d x,a,y,b = map(int,input().split()) if y == 1: print('Yes') exit() if x == 1: if y != 1: print('No') else: print('Yes') exit() C = factorize(x) D = factorize(y) for k, v in D.items(): if k not in C: print('No') exit() else: u = C[k] if (u*a)%(v*b) == 0: continue else: print('No') exit() print('Yes')