static String process ( int N , int K ) {
  int x = ( 1 << N ) ;
  while ( K >= x ) {
    K %= x ;
  }
  if ( K == x - 1 ) return "ON" ;
  return "OFF" ;
}

static String process ( int N , int K ) { int x = ( 1 << N ) ; while ( K >= x ) { K %= x ; } if ( K == x - 1 ) return " ON " ; return " OFF " ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (identifier))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) body: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (return_statement (string_literal))) (return_statement (string_literal))))