Prove that the area of a square lying inside a triangle does not exceed half the area of that triangle.