Brendan and Marie are each assigned a paper for a class they share. Brendan decides to write 41 pages at a time while Marie decides to write 18 pages at a time. If they end up writing the same number of pages, what is the smallest number of pages that the papers could have had?