main = getLine >>= print . (\[x, y] -> modn (x * y)) . map read . words where modn n = n `mod` 1000000007