Each of the $48$ faces of eight $1\times 1\times 1$ cubes is randomly painted either blue or green. The probability that these eight cubes can then be assembled into a $2\times 2\times 2$ cube in a way so that its surface is solid green can be written $\frac{p^m}{q^n}$ , where $p$ and $q$ are prime numbers and $m$ and $n$ are positive integers. Find $p + q + m + n$.

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