package main import "fmt" func main() { var a, b int fmt.Scan(&a, &b) var c int check := make(map[int]int, 10) for { c = a % b if c == 0 { fmt.Println("No") break } else { check[c]++ if check[c] > 1 { fmt.Println("Yes") break } a = c * 10 } } }