       IDENTIFICATION DIVISION.
       PROGRAM-ID. ATCODER.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  indata PIC X(100).
       01  a1 PIC S9(08).
       01  a2 PIC S9(08).
       01  a3 PIC S9(08).
       01  r1 PIC S9(08).
       01  r2 PIC S9(08).
       01  r3 PIC S9(08).
       01  g1 pic S9(08).
       01  g2 pic S9(08).
       01 disp pic Z(20)9.
       PROCEDURE DIVISION.
        ACCEPT a1.
        ACCEPT a2.
        

        divide a1 by 500 giving g1 remainder r1
        if r1 <= a2 then
         display "Yes"
        else
         display "No"
        end-if

 
 
       STOP RUN.
