local n, k = io.read("*n", "*n") local found = false local lim = math.ceil(math.sqrt(n)) for i = 2, lim do if(n % i == 0) then found = true print(math.floor(n / i)) break end end if(not found) then print(1) end