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. Find the probability that after they are painted, the cubes can be rotated to be identical in appearance. The original answer is in \(\frac{k}{m}\) format, please give the value of k + m.

Let's think step by step and output the final answer within \boxed{}.
user