A local gym has two different fees for their yoga classes. Members of the gym are charged a one-time membership fee of $12 and pay $8 per yoga class. Nonmembers do not pay a membership fee, but they pay $12 per class. How many yoga classes do nonmembers and members have to attend for their costs to be the same?