Amazon Interview Question

Find smallest divisor of 2 given strings