import java.io.BufferedReader import java.io.InputStream import java.io.InputStreamReader import java.io.PrintWriter import java.util.* fun gcd(a:Long, b:Long):Long { val c = a % b if (c == 0L) return b return gcd(b, c) } fun PrintWriter.solve(sc: FastScanner) { val a = sc.nextLong() val b = sc.nextLong() val d = gcd(a, b) var m = b / d while (m % 2 == 0L) m /= 2 while (m % 5 == 0L) m /= 5 println(if (m != 1L) "Yes" else "No") } fun main() { val writer = PrintWriter(System.out, false) writer.solve(FastScanner(System.`in`)) writer.flush() } class FastScanner(s: InputStream) { private var st = StringTokenizer("") private val br = BufferedReader(InputStreamReader(s)) fun next(): String { while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine()) return st.nextToken() } fun nextInt() = next().toInt() fun nextLong() = next().toLong() fun nextLine() = br.readLine() fun nextDouble() = next().toDouble() fun ready() = br.ready() }