Added upper bound validation

Due to memory running out, the program breaks any multiple of 10 higher
than 100000