<Tr> <Td> 14 </Td> <Td> Franklin Pierce </Td> <Td> Democratic </Td> <Td> 27 </Td> <Td> 28 </Td> <Td> 31 </Td> <Td> 33 </Td> <Td> 35 </Td> <Td> 36 </Td> <Td> 37 </Td> <Td> 37 </Td> <Td> 33 (tie) </Td> <Td> 39 </Td> <Td> 37 (tie) </Td> <Td> 39 </Td> <Td> 38 </Td> <Td> 40 </Td> <Td> 40 </Td> <Td> 39 </Td> <Td> 40 </Td> <Td> 41 </Td> <Td> 41 </Td> <Td> 40 </Td> </Tr> <Tr> <Td> 15 </Td> <Td> James Buchanan </Td> <Td> Democratic </Td> <Td> 26 </Td> <Td> 29 </Td> <Td> 33 </Td> <Td> 34 </Td> <Td> 37 </Td> <Td> 38 </Td> <Td> 39 </Td> <Td> 40 </Td> <Td> 38 </Td> <Td> 41 </Td> <Td> 39 </Td> <Td> 41 </Td> <Td> 40 </Td> <Td> 42 </Td> <Td> 42 </Td> <Td> 40 </Td> <Td> 43 </Td> <Td> 43 </Td> <Td> 43 </Td> <Td> 43 </Td> </Tr> <Tr> <Td> 16 </Td> <Td> Abraham Lincoln </Td> <Td> Republican </Td> <Td> 01 </Td> <Td> 01 </Td> <Td> 01 </Td> <Td> 01 </Td> <Td> 03 </Td> <Td> 02 </Td> <Td> 02 </Td> <Td> 01 </Td> <Td> 01 </Td> <Td> 01 </Td> <Td> 02 </Td> <Td> 02 </Td> <Td> 02 </Td> <Td> 01 </Td> <Td> 03 </Td> <Td> 02 </Td> <Td> 01 </Td> <Td> 01 </Td> <Td> 01 </Td> <Td> 01 </Td> </Tr> <Tr> <Td> 17 </Td> <Td> Andrew Johnson </Td> <Td> Democratic </Td> <Td> 19 </Td> <Td> 23 </Td> <Td> 32 </Td> <Td> 30 </Td> <Td> 38 </Td> <Td> 39 </Td> <Td> 40 </Td> <Td> 39 </Td> <Td> 37 </Td> <Td> 40 </Td> <Td> 36 </Td> <Td> 42 </Td> <Td> 37 </Td> <Td> 41 </Td> <Td> 43 </Td> <Td> 36 </Td> <Td> 41 </Td> <Td> 42 </Td> <Td> 40 </Td> <Td> 41 </Td> </Tr>

Who is the greatest president of the united states