Added support for input numbers up to but not including 10000.
Added support for numbers less than 1 quadrillion