At a certain bar, the probability of being a male dog is 40%…

At a certain bar, the probability of being a male dog is 40%. The probability the dog smokes, given that it’s male is 50%; the probability it smokes given that it’s female is 40%.  You walk in the bar and observe a dog smoking. What is the probability it is male?