A group of twelve people is going to take a ride on a roller coaster at the same time in two different trains. One train cannot fit more than 8 passengers, and the other cannot fit more than 7. In how many ways can the group take a ride?