public static void main ( String [ ] args ) throws IOException {
  BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ;
  StringBuilder sb = new StringBuilder ( ) ;
  String [ ] sr = br . readLine ( ) . split ( " " ) ;
  float n = next ( sr , 0 ) ;
  float a = next ( sr , 1 ) ;
  if ( n == 3 ) {
    System . out . println ( "1 2 3" ) ;
    return ;
  }
  float angle = ( ( n - 2 ) * 180 ) / n ;
  if ( a > angle ) {
    System . out . println ( "1 2 3" ) ;
    return ;
  }
  float per_n = angle / ( n - 2 ) ;
  double close = Math . floor ( a / per_n ) ;
  if ( close == 0 ) {
    System . out . println ( "1 2 " + ( int ) n ) ;
    return ;
  }
  if ( Math . abs ( close * per_n - a ) < Math . abs ( ( close + 1 ) * per_n - a ) ) {
    System . out . println ( "1 2 " + ( int ) ( n - ( int ) close + 1 ) ) ;
  }
  else System . out . println ( "1 2 " + ( int ) ( n - ( int ) close ) ) ;
}

public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; StringBuilder sb = new StringBuilder ( ) ; String [ ] sr = br . readLine ( ) . split ( " ▁ " ) ; float n = next ( sr , 0 ) ; float a = next ( sr , 1 ) ; if ( n == 3 ) { System . out . println ( "1 ▁ 2 ▁ 3" ) ; return ; } float angle = ( ( n - 2 ) * 180 ) / n ; if ( a > angle ) { System . out . println ( "1 ▁ 2 ▁ 3" ) ; return ; } float per_n = angle / ( n - 2 ) ; double close = Math . floor ( a / per_n ) ; if ( close == 0 ) { System . out . println ( "1 ▁ 2 ▁ " + ( int ) n ) ; return ; } if ( Math . abs ( close * per_n - a ) < Math . abs ( ( close + 1 ) * per_n - a ) ) { System . out . println ( "1 ▁ 2 ▁ " + ( int ) ( n - ( int ) close + 1 ) ) ; } else System . out . println ( "1 ▁ 2 ▁ " + ( int ) ( n - ( int ) close ) ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list)))) (local_variable_declaration type: (array_type element: (type_identifier) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list (string_literal))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (return_statement))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_integer_literal))) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (return_statement))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (string_literal) right: (cast_expression type: (integral_type) value: (identifier)))))) (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (identifier)) right: (identifier)))))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (string_literal) right: (cast_expression type: (integral_type) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (cast_expression type: (integral_type) value: (identifier))) right: (decimal_integer_literal))))))))) alternative: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (string_literal) right: (cast_expression type: (integral_type) value: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (integral_type) value: (identifier))))))))))))