import sys from collections import defaultdict import math class Sieve: def __init__(self, n=1): self.n = n self.f = [0] * (n + 1) self.primes = [] self._sieve() def _sieve(self): self.f[0] = self.f[1] = -1 for i in range(2, self.n + 1): if self.f[i]: continue self.primes.append(i) self.f[i] = i for j in range(i * i, self.n + 1, i): if not self.f[j]: self.f[j] = i def factor(self, x): res = [] for p in self.primes: count = 0 while x % p == 0: x //= p count += 1 res.append((p, count)) if x != 1: res.append((x, 1)) return res def solve(): # Read a single line of input, split by space, and map to float A, B = map(float, input().split()) a = round(A * 10000) b = round(B * 10000) sieve = Sieve(100005) factors = sieve.factor(a) ans = "Yes" for p, num in factors: if p == 2 or p == 5: num -= 4 if num * b < 0: ans = "No" if num * b % 10000 != 0: ans = "No" print(ans) if __name__ == "__main__": solve()