local ffi = require("ffi") local C = ffi.C ffi.cdef[[ long long atoll(const char*); ]] local function getgcd(x, y) while 0LL < x do x, y = y % x, x end return y end s = io.read() a, b = s:match("(%d+) (%d+)") a = C.atoll(a) b = C.atoll(b) gcd = getgcd(a, b) a = a / gcd b = b / gcd while b % 2LL == 0 do b = b / 2LL end while b % 5LL == 0 do b = b / 5LL end print(b == 1LL and "No" or "Yes")