Sergio Perez and Carlos Sainz were forced to retire their cars after they both suffered separate crashes at the Canadian Grand Prix.