Solution for Triangle.