given two unordered list find the greatest common integer