2 factors play role in pets' risk of developing cancer