A student appears for tests I, II and III. The student is successful if he passes either in tests I and II or tests I and III. The probabilities of the student passing in tests I, II and III are p, q and $\frac{1}{2}$ respectively. If the probability th at the student is successful, is $\frac{1}{2}$ then