CMIMC 2018 Team Problem 6.1

Jan rolls a fair six-sided die and calls the result r. Then, he picks real numbers a and b between 0 and 1 uniformly at random and independently. If the probability that the polynomial f(x)=\frac{x^{2}}{r}-x \sqrt{a}+b has a real root can be expressed as simplified fraction \frac{p}{q}, find p.