A box contains yellow and white tennis balls. Half the number of white balls equals a third of the number of yellow balls. Also, twice the whole number of balls exceeds three times the number of yellow balls by four. How many balls does the box contain?