IDENTIFICATION DIVISION.
PROGRAM-ID. Crackers.
 
DATA DIVISION.
WORKING-STORAGE SECTION.
01 INP     PIC X(100).
01 IN-N     PIC 9(3).
01 IN-K     PIC 9(3).
01 MAISU    PIC 9(3).
01 AMARI    PIC 9(2).
 
PROCEDURE DIVISION.
MAIN-001.
  ACCEPT INP.
  UNSTRING INP DELIMITED BY ALL ' '
      INTO IN-N IN-K.
 
  DIVIDE IN-N BY IN-K GIVING MAISU REMAINDER AMARI.

  IF (AMARI = 0)
    DISPLAY '0'
  ELSE
    DISPLAY '1'
  END-IF.
 
MAIN-EXIT.
  STOP RUN.