IDENTIFICATION DIVISION.
 PROGRAM-ID. TEST132.
 
 ENVIRONMENT DIVISION.
 
 DATA DIVISHION.
 WORKING-STORAGE SECTION.

 01 INP.
  03 N1 PIC 9(1).
  03 N2 PIC 9(1).
  03 N3 PIC 9(1).
  03 N4 PIC 9(1).

 PROCEDURE DIVISION.

  ACCEPT INP.

  EVALUATE TRUE
   WHEN (N1 = N2) AND (N3 = N4) AND (N1 NOT= N3)
   WHEN (N1 = N3) AND (N2 = N4) AND (N1 NOT= N2)
   WHEN (N1 = N4) AND (N2 = N3) AND (N1 NOT= N2)
    DISPLAY 'Yes'

   WHEN OTHER
    DISPLAY 'No'

  END-EVALUATE.

  STOP RUN. 