CMIMC 2017 Number Theory Problem 5

One can define the greatest common divisor of two positive rational numbers as follows: for a, b, c, and d positive integers with \operatorname{gcd}(a, b)=\operatorname{gcd}(c, d)=1, write

\operatorname{gcd}\left(\frac{a}{b}, \frac{c}{d}\right)=\frac{\operatorname{gcd}(a d, b c)}{b d}

For all positive integers K, let f(K) denote the number of ordered pairs of positive rational numbers (m, n) wiht m<1 and n<1 such that

\operatorname{gcd}(m, n)=\frac{1}{K}

What is f(2017)-f(2016)?