You can have multiple borrowers on a mortgage and on a real estate title. However, there are some significant challenges.
The first is finding a lender willing to handle the complexity of the transaction. There are lenders who will approve such a loan, provided that all five borrowers have good credit and jointly meet the income requirements. However, you are jointly responsible for the mortgage in that situation - if one borrower should fail to pay their share of the mortgage, the others must cover the difference or risk the whole property going into foreclosure.
There are also questions about having all five on the deed. What happens if one co-owner dies or fails to keep up mortgage payments? How do you remove them from the deed?
It may be easier to have one person purchase the property and have the others contractually obligated to him or her to make payments.
This is something you'll want to discuss with an experienced real estate attorney before proceeding, to make sure you've addressed all the ins and outs of such an arrangement and have in place an agreement that is workable and protects everyone's interests.