my_member(X,[X | List]).
my_member(X, [Y |List]) :- my_member(X, List).

member_both(X, L1, L2) :- my_member(X, L1), my_member(X, L2).
