Hide

Problem A
Political Distance

Accepted submissions to this problem will be granted a score of 5
Languages en is

The current policy of the government can be represented by the point (xp,yp). A voter’s ideal policy would be represented by the point (xv,yv). The voter’s unhappiness with the current policy is measured by the distance between these two points. Many different distance metrics may be used, but we will use squared Euclidean distance here.

Input

The first line contains two integers xp and yp. The second line contains two integers xv and yv. All values are integers between 109 and 109, inclusive on both ends.

Output

Output one integer, the voter’s unhappiness with the current policy.

Sample Input 1 Sample Output 1
-8 4
2 -6
200
Sample Input 2 Sample Output 2
20 -3
20 1
16
Hide

Please log in to submit a solution to this problem

Log in