n square runing time with DP for LIS