In a class of 27 students, 7 have a cat and 9 have a dog. There are 5 students who have a cat and a dog. What is the probability that a student has a dog given that they have a cat?