A hardcover math book is 289 pages longer than a paperback math book. if the total number of pages in these two books is 1691, how many pages are in each book?