IDENTIFICATION DIVISION.
PROGRAM-ID. B-String-R.
 
DATA DIVISION.
WORKING-STORAGE SECTION.
01 S      PIC X(100).
01 T      PIC X(100).
01 SS     PIC X(200).
01 S-LEN  PIC 9(3).
01 I      PIC 9(3).
 
PROCEDURE DIVISION.
MAIN-001.
  ACCEPT S.
  ACCEPT T.

  UNSTRING S DELIMITED BY ' '
    INTO S COUNT S-LEN. 
  STRING S S DELIMITED BY ' '
    INTO SS.

  INSPECT SS TALLYING I FOR ALL T(1:S-LEN).

  IF (I > 0)
    DISPLAY 'Yes'
  ELSE
    DISPLAY 'No'
  END-IF.
 
MAIN-EXIT.
  STOP RUN.
