((p and q) xnor (q implies r)) and (q or p)