It takes 40 ink cartridges and 200 pages to print a book, and it takes 303030 ink cartridges and 80 pages to print a magazine. Sarah wants to print books and magazines with at most 300 ink cartridges and 1200 pages. Let B denote the number of books she prints and M the number of magazines she prints.