package main import . "fmt" import . "os" import bf "bufio" import . "math/big" func main() { rd:=bf.NewReader(Stdin) var a,b int Fscan(rd,&a,&b) x,y:=new(Int),new(Int) Fscan(rd,x) for ;a>1;a-- { Fscan(rd,y) x.GCD(nil,nil,x,y) } e:=x.Int64() for ;b>0;b-- { var c int64 Fscan(rd,&c) if c%e !=0 { Println("No") return } } Println("Yes") }