Where does “내기” come from?

Words derived from “내기