Rational numbers $a$ and $b$ are chosen at random among all rational numbers in the interval $[0,2)$ that can be written as fractions $\dfrac nd$ where $n$ and $d$ are integers with $1\le d\le5$. What is the probability that $(\cos(a\pi)+i\sin(b\pi))^4$ is a real number?