if the princess agreed , he would decree that the boy should be imprisoned in the palace for twenty-one years and a day , and for that time the princess would be banished from the palace and live among the mortals outside the walls .