A cookie jar contains 315 M&M's. There are only brown and green M&M's in the jar. The number of green M&M's is 8 times that of the brown M&M's. Write and solve a system to find out how many of each color M&M are in the jar.