There is no one answer to this that is correct for all systems that have both a prime minister and a president (or which have equivalent offices). The relative amounts of power are decided by the constitutions of the individual countries.
To see how this is true, let us look at the examples of France and Germany. France has a system in which the president has the most power. The people that everyone sees as the leaders of France are the presidents. Nicolas Sarkosy was the President of France. Right now Francois Hollande is the President. These men are known around the world. By contrast, the Prime Minister is a man named Jean-Marc Ayrault. He is not well-known and generally has less power than Hollande does. In Germany, however, the Prime Minister (called the Chancellor) is much more powerful than the President. Here, the Chancellor, Angela Merkel, is the person known as Germany’s leader. The President is named Joachim Gauck. His responsibilities are mainly ceremonial.
Thus, we can see that there is no one answer that fits all. Different countries have different systems.
As far as my country Pakistan is concerned,every power is in the hand of prime minister.He distributes ministries among the elected persons and is found always in restlessness;where as the president,he is statue and his role is very pity.He is always found alone,when any spokesman or any minster of homeland or other countries goes to meet him,we see him before or on media.So prime minister is more powerful.