from collections import * def factorization(n): arr = [] temp = n for i in range(2, int(-(-n**0.5 // 1)) + 1): if temp % i == 0: cnt = 0 while temp % i == 0: cnt += 1 temp //= i arr.append([i, cnt]) if temp != 1: arr.append([temp, 1]) if arr == []: arr.append([n, 1]) return arr x, a, y, b = map(int, input().split()) if x == 1: if y == 1: print("Yes") exit() else: print("No") exit() if y == 1: print("Yes") exit() xl, yl = factorization(x), factorization(y) dx, dy = defaultdict(int), defaultdict(int) for li in xl: num, j = li dx[num] = j * a for li in yl: num, j = li if dx[num] < j * b: print("No") exit() print("Yes")