      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 ) OR ( C = D )
      	DISPLAY "YES"
      ELSE
      	IF ( A = C ) OR ( B = D )
      		DISPLAY "YES"
      	ELSE
      		IF ( A = D ) OR ( B = C )
			DISPLAY "YES"
      		ELSE
      		DISPLAY "NO"
      		END-IF
        END-IF
      END-IF.
      
      STOP RUN.
      		
      		