PROGRAM c167a

IMPLICIT NONE
CHARACTER(LEN=10) :: S
CHARACTER(LEN=11) :: T
INTEGER :: b

READ *, S
READ *, T

b = LEN_TRIM(T)
 
 IF (T(1 : b-1) == TRIM(S)) THEN
  PRINT *, 'Yes'
 ELSE
  PRINT *, 'No'
 END IF
 
END PROGRAM c167a