An examination paper consists of 12 questions divided into two parts, part A and part B. Part A contains 7 questions and part B contains 5 questions. A candidate is required to attempt 8 questions, selecting at least 3 from each part. In how many ways can he select the questions?