dad(randy, gabe).
mom(lori, gabe).

mom(beverly, randy).
dad(chris, randy).

dad(bill, lori).
mom(patti, lori).

dad(bill, lynn).
mom(patti, lynn).

dad(bill, jeff).
mom(patti, jeff).

dad(eric, nate).
mom(lynn, nate).

dad(eric, natalie).
mom(lynn, natalie).

dad(scott, emily).
mom(julia, emily).

mom(beverly, scott).
dad(chris, scott).

parent(X,Y) :-
	dad(X,Y).
parent(X,Y) :-
	mom(X,Y).

grandparent(X,Z) :-
	parent(X,Y), parent(Y,Z).

greatgrandparent(X, Z) :-
	grandparent(X, Y), parent(Y, Z).

sibling(X, Z) :-
	mom(Y, X), mom(Y, Z), dad(Q, X), dad(Q, Z), X \= Z.

	





