Didn't know Haskell had such a useful LCM function. That was easy.