The numbers $a$ and $b$ are positive integers both greater than 5. The function $f(x) = \cos ^2 x - a \sin x + b$ has a maximum of $34$ and a minimum of $12$. What is the value of the product $a \times b$?

Your answer seems reasonable.
Find out if you're right!