pal n = x == reverse x where x = show n main = print . maximum . filter pal $ [i*k | i <- [100..999], k <- [100..999]]