      IDENTIFICATION DIVISION.
      PROGRAM-ID. 132A.
      DATA DIVISION.
      WORKING-STORAGE SECTION.
      01 INP.
      	03 A PIC X(1).
       	03 B PIC X(1).
       	03 C PIC X(1).
       	03 D PIC X(1).
       
      PROCEDURE DIVISION.
      
      ACCEPT INP.
      
      IF (( A = B ) AND ( C = D )) OR
         (( A = C ) AND ( B = D )) OR
         (( A = D ) AND ( B = C ))
      	DISPLAY "YES"
      ELSE
        DISPLAY "NO"
      END-IF.
      
      STOP RUN.
  