import java.util.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintWriter ou = new PrintWriter(System.out); int n = Integer.parseInt(sc.next()); int h = Integer.parseInt(sc.next()); for(int i = 0 ; h != 1 && i < n ; i++){ int a = Integer.parseInt(sc.next()); int p = a , q = h , z = p % q; while(z != 0){ p = q; q = z; z = p % q; } h /= q; } if(h == 1) ou.println("YES"); else ou.println("NO"); ou.flush(); sc.close(); } }