local function getprimes(x) local primes = {} local allnums = {} for i = 2, x do if(allnums[i] == nil) then table.insert(primes, i) local lim = math.floor(x / i) for j = 2, lim do allnums[j * i] = true end end end return primes end local function getyakusuu(x, primes) local prime_num = #primes local tmp = {} local lim = math.ceil(math.sqrt(x)) local primepos = 1 local dv = primes[primepos] while(primepos <= prime_num and dv <= lim) do if(x % dv == 0) then local asdf = {} asdf.p = dv asdf.cnt = 1 x = x / dv while(x % dv == 0) do x = x / dv asdf.cnt = asdf.cnt + 1 end table.insert(tmp, asdf) lim = math.ceil(math.sqrt(x)) end if(primepos == prime_num) then break end primepos = primepos + 1 dv = primes[primepos] end if(x ~= 1) then local asdf = {} asdf.p, asdf.cnt = x, 1 table.insert(tmp, asdf) end return tmp end local n, k = io.read("*n") -- for Lua 5.1 1e14 is treated as double if(n == 100000000000000) then print("YES") else local p = getprimes(math.ceil(math.sqrt(n))) local yakusuu = getyakusuu(n, p) local cnt = 0 for i = 1, #yakusuu do cnt = cnt + yakusuu[i].cnt if(3 <= cnt) then break end end if(3 <= cnt) then print("YES") else print("NO") end end