PUMaC 2018 Number Theory B Problem 6

Let n be a positive integer. Let f(n) be the probability that, if divisors a, b, c of n are selected uniformly at random with replacement, then \operatorname{gcd}(a, \operatorname{lcm}(b, c))=\operatorname{lcm}(a, \operatorname{gcd}(b, c)). Let s(n) be the sum of the distinct prime divisors of n. If f(n)<\frac{1}{2018}, compute the smallest possible value of s(n).