Company: Auxia_22july
Difficulty: medium
Minimal Area Rectangle Problem Description Pavel made a photo of his favourite stars in the sky. His camera takes a photo of all points of the sky that belong to some rectangle with sides parallel to the coordinate axes. Pavel's camera makes a photo of all points with coordinates (x, y) such that x1 < x2 and y1 < y2, where (x1, y1) and (x2, y2) are coordinates of the bottom left and the top right corners of the rectangle being photographed. The area of the rectangle is (x2 - x1) * (y2 - y1). Also, taking the photo, Pavel wrote down coordinates of n of his favourite stars which appeared in the photo. These points are not necessarily distinct. The coordinates of stars are integers. Pavel has lost his camera recently and wants to buy a similar one. Specifically, he wants to know the dimensions of the photo he took earlier. Unfortunately, the photo is also lost, his notes are also of not much help: numbers are written in random order all over his notepad, so it's impossible to tell w