(a) In how many ways can 5 men and women stand in a queue in such a way that no two women stand together and no two men stand together?
(b) A librarian wants to put 30 different books on 3 shelves, 10 books on each shelf. In how many ways can he do that if the order of books on each shelf is not important, but it is important on what shelf a book is.