Two different cubes of the same size are to be painted, with the color of each face being chosen independently and at random to be either black or white. Given that each cube has exactly three black faces and three white faces, what is the probability that after they are painted, the cubes can be rotated to be identical in appearance?