Longest common increasing  subsequence Problem