IDENTIFICATION DIVISION.
PROGRAM-ID. 167A.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 S          PIC X(12).
01 T          PIC X(12).
01 L1         PIC 9(02).
01 L2         PIC 9(02).
*>
PROCEDURE DIVISION.
  ACCEPT S.
  ACCEPT T.
  UNSTRING S DELIMITED BY ' '
      INTO S COUNT L1.
  UNSTRING T DELIMITED BY ' '
      INTO T COUNT L2.
*>
  IF (L2 = L1 + 1) AND
     (S(1:L1) = T (1:L1))
    DISPLAY 'Yes'
  ELSE
    DISPLAY 'No'
  END-IF. 
*>
  STOP RUN.
