NEED HELP ! in the solution of problem Rectangle

week 2 DSA learning series. It is showing WA for my solution of problem -Rectangle (CodeChef: Practical coding for everyone).

my solution link is (CodeChef: Practical coding for everyone). Please guide me.
Logic used by me : Find max length between two consecutive points in x axis and multiply it with 500(max value of y).

@rishikeshjoshi logic is wrong , imagine all points collinear with equidistant suppose 1. Ur ans is 500*1. But ans will be 10^5 * (ordinate of points)

How do i solve it then … please share your approach.