triangle classification problem