m = io.read("*n") if(m % 2 == 0) then print(string.format("%d %d", 2, m / 2)) else max = math.ceil(math.sqrt(m)) f = false for i = 3, max, 2 do if(m % i == 0) then print(string.format("%d %d", i, m / i)) f = true break end end end if(not f) then print(string.format("1 %d", m)) end