In the quadrilateral ABCD the diagonals AC and BD intersect at the point E. It is known that the perimeter of the triangle ABC is equal to the perimeter of the triangle ABD, and the perimeter of the triangle ACD equals the perimeter of the triangle BCD. Prove that AE=BE.