Divide Two Integers & Longest Common prefix