using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static long[] NList => ReadLine().Split().Select(long.Parse).ToArray(); static long[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); public static void Main() { Solve(); } static void Solve() { var c = NList; var (a, b) = (c[0], c[1]); var gcd = GCD(a, b); var pa = b / gcd; while (pa % 2 == 0) pa /= 2; while (pa % 5 == 0) pa /= 5; WriteLine(pa == 1 ? "No" : "Yes"); } static long GCD(long a, long b) { if (a < b) return GCD(b, a); if (a % b == 0) return b; return GCD(b, a % b); } }