import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int h = sc.nextInt(); int[] as = new int[n]; long data = 1l; if(h == 1){ System.out.println("YES"); return; } for(int i = 0 ; i < n ; i++){ int a = sc.nextInt(); data = (data % h) * (a % h); } System.out.println(data % h == 0 ? "YES" : "NO"); } }