	SUBROUTINE PCHECK(IC,ID,IOUT,NA)
C	IOUT=0 IF PATTERN NOT SIMILAR.
	DIMENSION IC(8,2),ID(8,2)
C	DEBUG OUTPUTS:
D	WRITE(5,10) ((IC(J,K),K=1,2),J=1,NA)
D	WRITE(5,11) ((ID(J,K),K=1,2),J=1,NA)
10	FORMAT(' IC:',8(X,I2,',',I2,2X))
11	FORMAT(' ID:',8(X,I2,',',I2,2X))
	DO 1 I=1,NA
	I1=IC(I,1)
	I2=IC(I,2)
	DO 2 J=1,NA
	IF(ID(J,1).EQ.I1.AND.ID(J,2).EQ.I2) GOTO 1
2	CONTINUE
	GOTO 5 ! STAR POSITION NOT FOUND IN ID, RETURN
1	CONTINUE
C	IC = ID AT THIS POINT
	IOUT=1
5	RETURN
	END
