Kesha sharpened 4 colors of pencils for her teacher. She sharpened equal amounts of red and green pencils. Then she sharpened twice as many blue and yellow pencils in equal amounts. How many of the 42 pencils were yellow?