The vertices \( V \) of a centrally symmetric octagon in the complex plane are given by 
\[ V = \left\{ \pm 1, \pm i, \pm \frac{1}{\sqrt{2}} (1+i), \pm \frac{1}{\sqrt{2}} (1-i) \right\}. \]
For each \( j \), \( 1 \leq j \leq 8 \), an element \( z_j \) is chosen from \( V \) at random, independently of the other choices. Let \( P = \prod_{j=1}^{8} z_j \) be the product of the 8 numbers selected. The probability that \( |P| = 1 \) can be expressed in the form \(\frac{a}{b}\), where \( a \) and \( b \) are positive integers. Find \( a + b \). Let's think step by step and output the final answer within \boxed{}.
user