find small/large number from input