A factory produces two types of shirt: shirt A and shirt B. Each type of shirt has 3 sizes: small (S), medium (M) and large (L). The number of shirt A produced and the number of shirt B produced are in a ratio 2:3. For each type of shirt, the number of shirts in S, M, L sizes are in the ratio 2:5:3

(a) If a shirt is chosen at random, find the probability that it is shirt A in S size.

(b) If a shirt is chosen at random and found to be size S, find the probability that it is shirt B.

(c) If two shirts are selected at random with replacement, find the probabilities that

(i) Both shirts are of the same type.

(ii) Both shirts are of the same type and size.

Actually I have no problems with (a) and (b), I only put it here as reference, but I find it difficult to deal with c(i) and especially c(ii)