a,b=gets.split.map &:to_i g=a.gcd b b/=g b/=2 while b%2<1 b/=5 while b%5<1 puts b==1 ? :No : :Yes