public static void main ( String args [ ] ) {
  FastReader in = new FastReader ( ) ;
  PrintWriter so = new PrintWriter ( new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ) ;
  String s = in . next ( ) ;
  int h = Integer . parseInt ( s . substring ( 0 , 2 ) ) ;
  int m = Integer . parseInt ( s . substring ( 3 , 5 ) ) ;
  h = ( h >= 12 ) ? h - 12 : h ;
  so . println ( ( h * 60 * 0.5 ) + ( m * 0.5 ) + " " + ( m * 60 * 0.1 ) ) ;
  so . flush ( ) ;
}

public static void main ( String args [ ] ) { FastReader in = new FastReader ( ) ; PrintWriter so = new PrintWriter ( new BufferedWriter ( new OutputStreamWriter ( System . out ) ) ) ; String s = in . next ( ) ; int h = Integer . parseInt ( s . substring ( 0 , 2 ) ) ; int m = Integer . parseInt ( s . substring ( 3 , 5 ) ) ; h = ( h >= 12 ) ? h - 12 : h ; so . println ( ( h * 60 * 0.5 ) + ( m * 0.5 ) + " ▁ " + ( m * 60 * 0.1 ) ) ; so . flush ( ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) body: (block (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: (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 (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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (decimal_integer_literal))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal) (decimal_integer_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (ternary_expression condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (binary_expression left: (identifier) right: (decimal_integer_literal)) alternative: (identifier)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_floating_point_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_floating_point_literal)))) right: (string_literal)) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_floating_point_literal))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))