I am certain that someone here can, if you show us what you've already done first. Doing the work for you, however, would not be considered 'helping' by most of the folk here.
(I've actually been criticized for posting too much 'help' at times, rather than giving the original poster the chance to work out a problem themselves, and I deserved it, too.)
I should add that Prolog is a family of incompatible dialects, rather than a single language. It would help if you told us which interpreter or compiler you are using.