public static void main ( String [ ] args ) {
  String input = sc . nextLine ( ) ;
  StringBuilder output = new StringBuilder ( "YES\n" ) ;
  int pointer = 0 ;
  while ( pointer < input . length ( ) ) {
    int i = pointer ;
    while ( i < input . length ( ) && input . charAt ( i ) != '.' ) i ++ ;
    int noOfCharsInName = i - pointer ;
    if ( noOfCharsInName < 1 || noOfCharsInName > 8 || i >= input . length ( ) ) {
      System . out . println ( "NO" ) ;
      return ;
    }
    pointer = i ++ ;
    int noOfCharsToConsiderAfterDot = 1 ;
    while ( i < input . length ( ) && input . charAt ( i ) != '.' && i < pointer + 4 ) i ++ ;
    if ( i >= input . length ( ) && i - pointer - 1 > 3 || i - pointer - 1 == 0 ) {
      System . out . println ( "NO" ) ;
      return ;
    }
    if ( i >= input . length ( ) || input . charAt ( i ) != '.' ) noOfCharsToConsiderAfterDot = i - pointer - 1 ;
    String completeFileName = input . substring ( pointer - noOfCharsInName , pointer + noOfCharsToConsiderAfterDot + 1 ) ;
    output . append ( completeFileName ) ;
    output . append ( "\n" ) ;
    pointer += noOfCharsToConsiderAfterDot + 1 ;
  }
  System . out . println ( output ) ;
}

public static void main ( String [ ] args ) { String input = sc . nextLine ( ) ; StringBuilder output = new StringBuilder ( " YES \n " ) ; int pointer = 0 ; while ( pointer < input . length ( ) ) { int i = pointer ; while ( i < input . length ( ) && input . charAt ( i ) != ' . ' ) i ++ ; int noOfCharsInName = i - pointer ; if ( noOfCharsInName < 1 || noOfCharsInName > 8 || i >= input . length ( ) ) { System . out . println ( " NO " ) ; return ; } pointer = i ++ ; int noOfCharsToConsiderAfterDot = 1 ; while ( i < input . length ( ) && input . charAt ( i ) != ' . ' && i < pointer + 4 ) i ++ ; if ( i >= input . length ( ) && i - pointer - 1 > 3 || i - pointer - 1 == 0 ) { System . out . println ( " NO " ) ; return ; } if ( i >= input . length ( ) || input . charAt ( i ) != ' . ' ) noOfCharsToConsiderAfterDot = i - pointer - 1 ; String completeFileName = input . substring ( pointer - noOfCharsInName , pointer + noOfCharsToConsiderAfterDot + 1 ) ; output . append ( completeFileName ) ; output . append ( " \n " ) ; pointer += noOfCharsToConsiderAfterDot + 1 ; } System . out . println ( output ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (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: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) right: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (character_literal)))) body: (expression_statement (update_expression (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (update_expression (identifier)))) (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: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) right: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (character_literal))) right: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))))) body: (expression_statement (update_expression (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) right: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)) right: (decimal_integer_literal))) right: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)) 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))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) right: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (character_literal)))) consequence: (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))