Pakistan Prime Minister Shehbaz Sharif has vowed to retaliate after India fired missiles into several locations controlled by Pakistan, killing more than two dozen people.