should Muslims believe in Pir's?

The pir had some knowledge that he could find out things but couldnt give a solution.
The amil(pir) has jinns and moakils in his control which tell him about anything that u ask about a person.