function factorize (n) local factors = {} for i = 2, n do if i * i > n then break end while n % i == 0 do n = n / i table.insert(factors, i) end end if n > 1 then table.insert(factors, n) end return factors end n = io.read("*n") factors = factorize(n) if #factors >= 3 then print("YES") else print("NO") end