A cuboid of dimensions (6 cm×4 cm×1 cm) is painted black on both the surfaces of dimensions (4 cm×1 cm), green on the surfaces of dimensions (6 cm × 4 cm) and red on the surfaces of dimensions (6 cm×1 cm). Now the block is divided into various smaller cubes of side 1 cm each. The smaller cubes so obtained are separated.
How many cubes will have all three colours black, green and red each at least on one side?