p (1..n).count{|i|(a%i)*(b%i)*(c%i)<1}