Refactored human, input, and output classes to only accept valid numbers