IDENTIFICATION DIVISION.
PROGRAM-ID. 145B.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 S     PIC X(100).
01 N     PIC 9(3).
01 H     PIC 9(2).
01 A     PIC 9(1).
*>
PROCEDURE DIVISION.
  ACCEPT N.
  ACCEPT S.
*>
  DIVIDE N BY 2 GIVING H REMAINDER A.
  IF (A = 0)
    IF (S(1:H) = S(H + 1:H))
      DISPLAY 'Yes'
    ELSE
      DISPLAY 'No'
    END-IF
  ELSE
    DISPLAY 'No'
  END-IF.
*>
  STOP RUN.
