Area and perimeter of triangles