import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int h = sc.nextInt(); while (0 < n-- && h > 1) { h /= getGCD(h, sc.nextInt()); } if (h == 1) { System.out.println("YES"); } else { System.out.println("NO"); } } static int getGCD(int x, int y) { if (x % y == 0) { return y; } else { return getGCD(y, x % y); } } }