local ffi = require("ffi") local C = ffi.C ffi.cdef[[ long long atoll(const char*); ]] s = io.read() a, b = s:match("(%d+) (%d+)") b = C.atoll(b) 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")