IDENTIFICATION                   DIVISION.
PROGRAM-ID.                      ABC_086_B.
ENVIRONMENT                      DIVISION.
DATA                             DIVISION.
WORKING-STORAGE                  SECTION.
    01 INP    PIC X(7).
    01 INP2   PIC X(6).
    01 num    PIC 9(6).
    01 a      PIC X(3).
    01 b      PIC X(3).
    01 i      PIC 9(6).
    01 ans    PIC X(18).
    01 flg    PIC 9(1) VALUE 0.
PROCEDURE                        DIVISION.
MAIN.
    ACCEPT INP.

    UNSTRING INP
    DELIMITED BY SPACE
    INTO a b.

    STRING
    a(1:FUNCTION STORED-CHAR-LENGTH(a))
    b(1:FUNCTION STORED-CHAR-LENGTH(b))
    INTO INP2.

    MOVE INP2 TO num.

    PERFORM VARYING i FROM 2 BY 1 UNTIL num < i
        IF num < i * i THEN
            EXIT PERFORM
        ELSE
            IF num = i * i THEN
                MOVE 1 TO flg
            END-IF
        END-IF
    END-PERFORM.

    IF flg = 1 THEN
        DISPLAY "Yes"
    ELSE
        DISPLAY "No"
    END-IF.

    STOP RUN.
