~(p and q) = q or ((~p or r) and (~p or ~r))

Could anyone help me figure out how to show that these are equivalent using logical equivalences. I tried using De Morgans law on the RHS and simplifying it to the LHS but I keep getting (q or p) which is not equivalent to ~(p and q).