Let

*r*,

*o*,

*y*,

*g*,

*b*, and

*v* be the quantities of the blocks.

Since *b* = *y*, *b* + *y* is even. Similarly with *v* and *o*. even + even + *r* + *g* = 10. *r* + *g* must be even. *r* is odd, so *g* is odd.

*g* is not prime but is odd. In the range of [1, 10], the only possibilities are 1 and 9. Since there is at least one of each colour, 9 is out. *g* = 1.

(*b* + *y*) + (*v* + *o*) = 8. *y* < *o*. The only possibility that fits there being at least one of each colour is *b* = *y* = 1 and *v* = *o* = 3.

*r* = 1, *o* = 3, *y* = 1, *g* = 1, *b* = 1, *v* = 3.