package main import ( "bufio" "fmt" "os" ) func main() { N, H := ReadInt(), ReadInt() A := ReadInt() A %= H for i := 1; i < N; i++ { v := ReadInt() A *= v A %= H } if A == 0 { fmt.Println("YES") } else { fmt.Println("NO") } } var reader = bufio.NewReader(os.Stdin) func Scan(a ...interface{}) { if _, err := fmt.Fscan(reader, a...); err != nil { panic(err) } } func ReadInt() (i int) { Scan(&i); return } func ReadString() (s string) { Scan(&s); return } func ReadInts(n int) (a []int) { for i := 0; i < n; i++ { a = append(a, ReadInt()) } return }