A solid cube is painted red on two adjacent faces and black on the faces opposite to those painted red. The remaining faces are painted green and the cube is then cut into 64 smaller cubes of equal size.
How many smaller cubes are painted red on one face and black on the other?