If $a$ and $b$ are positive integers such that
\[
  \sqrt{8 + \sqrt{32 + \sqrt{768}}} = a \cos \frac{\pi}{b} \, ,
\]compute the ordered pair $(a, b)$.
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
If $a$ and $b$ are positive integers such that
\[
  \sqrt{8 + \sqrt{32 + \sqrt{768}}} = a \cos \frac{\pi}{b} \, ,
\]compute the ordered pair $(a, b)$.
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
(4,24)
If $a$ and $b$ are positive integers such that
\[
  \sqrt{8 + \sqrt{32 + \sqrt{768}}} = a \cos \frac{\pi}{b} \, ,
\]compute the ordered pair $(a, b)$.
train