In a two-candidate election 1401 votes were cast. If 30 voters had switched their votes from the winner to the loser, the loser would have won by 5 votes. How many votes did each candidate actually receive?