IDENTIFICATION DIVISION.
PROGRAM-ID. A-BEGINNER.
 
DATA DIVISION.
WORKING-STORAGE SECTION.
01 INP     PIC X(100).
01 IN-A     PIC 9.
01 IN-B     PIC 9.
01 IN-C     PIC 9.
 
PROCEDURE DIVISION.
MAIN-001.
  ACCEPT INP.
  UNSTRING INP DELIMITED BY ALL ' '
      INTO IN-A IN-B IN-C.
 
  IF (IN-A = IN-B) AND (IN-B NOT = IN-C) OR
     (IN-B = IN-C) AND (IN-C NOT = IN-A) OR
     (IN-C = IN-A) AND (IN-A NOT = IN-B)
     DISPLAY 'Yes'
  ELSE
     DISPLAY 'No'
  END-IF.
 
MAIN-EXIT.
  STOP RUN.
