A librarian put 39 books back on the shelves before lunch. Of the books, 13 were non-fiction. What is the ratio of the number of non-fiction books to the total number of books the librarian put away before lunch?
A. 1 to 2
B. 1 to 3
C. 3 to 1
D. 2 to 1