Dot Product
Time limit2sMemory limit1024 MB
Given N vectors with positive integer coordinates, find the maximum dot product of two distinct vectors in the set.
Problem
two-dimensional vectors are given.
Choose two different vectors from these and find the maximum value of their dot product.
The dot product of two vectors is defined as .
Input
The first line contains the number of vectors . ()
From the second line through line , the two components of the -th vector are given separated by a space. (, are integers)
All vectors are distinct.
Output
Print the maximum dot product of two different vectors chosen from the set. That is, print .