IDENTIFICATION DIVISION.
PROGRAM-ID. 101B.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 N       PIC 9(10).
01 N-X     REDEFINES N.
   03  N-9 PIC 9(01) OCCURS 10.
01 S       PIC 9(02).
01 SHO     PIC 9(10).
01 R       PIC 9(02).   
01 I       PIC 9(02).
*>
PROCEDURE DIVISION.
  ACCEPT N.
*>      
  MOVE 0 TO S.
  PERFORM VARYING I FROM 1 BY 1 UNTIL I > 10
    ADD N-9(I) TO S
  END-PERFORM.
*>
  DIVIDE N BY S GIVING SHO REMAINDER R.
  IF (R = 0) 
    DISPLAY 'Yes'
  ELSE
    DISPLAY 'No'
  END-IF. 
*>
  STOP RUN.
