Neares Distance and setting input