public static boolean isDivisible ( int num , int x , int y ) {
  while ( num % x == 0 || num % y == 0 ) {
    if ( num % x == 0 ) num /= x ;
    if ( num % y == 0 ) num /= y ;
  }
  if ( num > 1 ) return false ;
  return true ;
}

public static boolean isDivisible ( int num , int x , int y ) { while ( num % x == 0 || num % y == 0 ) { if ( num % x == 0 ) num /= x ; if ( num % y == 0 ) num /= y ; } if ( num > 1 ) return false ; return true ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (return_statement (false))) (return_statement (true))))