A survey is conducted among $106$ people. Among them $47$ people have dogs, $58$ people have cats and $38$ people have parrots. $16$ people have both a dog and cat, $15$ people have both cat and parrot and $17$ people have both a parrot and dog. Each of them has at least one of the pets.