Both of these are incredibally important and literary agents would argue the first para is vital as it has to grab the reader and reel them in. I think last paragraphs are just as important; these are the final thoughts and final interaction with the narrator, author, protagonist/antagonist etc. A beautiful final para will make you feel bereft for leaving the world or the characters. I'm not necessarily talking about a Shyamalan twist, it could just be something simple, subtle. What springs to mind for me is the final para in Sophie's Choice; dreamily descriptive and unassuming.