# a common method to solving number theory olympiad problems like these is to first find some upper bound, then check all the bases below that bound