       IDENTIFICATION DIVISION.
       PROGRAM-ID. test1.
       ENVIRONMENT DIVISION.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 A PICTURE 999.
       01 B PICTURE 999.
       01 X PICTURE 999.
       01 INp PICTURE X(21).
       01 temp picture 9999.
       01 S PICTURE 999.
       01 N PIC 999.
       01 tempb picture 9999.
       PROCEDURE DIVISION.
       MAIN.
       ACCEPT INp.
       PERFORM VARYING S FROM 1 BY 1 UNTIL INp(S:1)= SPACE
       END-PERFORM.
       move S TO temp.
       add -1 to temp.
       MOVE INp(1:temp) TO A.
       add 2 to temp
       PERFORM VARYING N FROM temp BY 1 UNTIL INp(N:1)= SPACE
       END-PERFORM.
       move N TO tempb.
       subtract S FROM tempb.
       MOVE INp(temp:tempb) TO B.
       MOVE N TO temp.
       add 1 to temp.
       PERFORM VARYING S FROM temp BY 1 UNTIL INp(S:1)= SPACE
       END-pERFORM.
       move S TO tempb.
       subtract N FROM tempb.
       MOVE INp(temp:tempb) TO X.
      	IF X >= A AND X<=A+B THEN
      		DISPLAY "YES"
      	ELSE
      		DISPLAY "NO"
      	END-IF.
      	STOP RUN.