static void main ( ) throws Exception {
  int n = sc . nextInt ( ) , k = sc . nextInt ( ) ;
  HashSet < Integer > all = new HashSet < Integer > ( ) ;
  while ( n -- > 0 ) {
    all . add ( sc . nextInt ( ) ) ;
  }
  for ( int i = k ;
  i <= 1000000 ;
  i += k ) {
    if ( all . contains ( i ) ) {
      pw . println ( "Yes" ) ;
      return ;
    }
  }
  for ( int i = 2 ;
  i <= k ;
  i ++ ) {
    if ( k % i == 0 ) {
      int cur = 1 ;
      while ( k % i == 0 ) {
        k /= i ;
        cur *= i ;
      }
      boolean f = false ;
      for ( int j = cur ;
      j <= 1000000 ;
      j += cur ) {
        if ( all . contains ( j ) ) {
          f = true ;
          break ;
        }
      }
      if ( ! f ) {
        pw . println ( "No" ) ;
        return ;
      }
    }
  }
  pw . println ( "Yes" ) ;
}

static void main ( ) throws Exception { int n = sc . nextInt ( ) , k = sc . nextInt ( ) ; HashSet < Integer > all = new HashSet < Integer > ( ) ; while ( n -- > 0 ) { all . add ( sc . nextInt ( ) ) ; } for ( int i = k ; i <= 1000000 ; i += k ) { if ( all . contains ( i ) ) { pw . println ( " Yes " ) ; return ; } } for ( int i = 2 ; i <= k ; i ++ ) { if ( k % i == 0 ) { int cur = 1 ; while ( k % i == 0 ) { k /= i ; cur *= i ; } boolean f = false ; for ( int j = cur ; j <= 1000000 ; j += cur ) { if ( all . contains ( j ) ) { f = true ; break ; } } if ( ! f ) { pw . println ( " No " ) ; return ; } } } pw . println ( " Yes " ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters) (throws (type_identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (type_identifier))) arguments: (argument_list)))) (while_statement condition: (parenthesized_expression (binary_expression left: (update_expression (identifier)) right: (decimal_integer_literal))) body: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (assignment_expression left: (identifier) right: (identifier)) body: (block (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) (return_statement))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) consequence: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) body: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (false))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (assignment_expression left: (identifier) right: (identifier)) body: (block (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (true))) (break_statement))))) (if_statement condition: (parenthesized_expression (unary_expression operand: (identifier))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) (return_statement))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))))))