Two identical blue blocks, two identical red blocks, two identical green blocks, and two identical purple blocks are placed next to each other in a row. Find the number of distinct arrangements of these blocks where no blue block is placed next to a red block, and no green block is placed next to a purple block.