Swamp
The swamp is shaped like a rectangle with sides aligned to the coordinate axes. Two opposite corners of the swamp are located at the coordinates (0, 0) and (W, H), where W and H are positive integers. Within the swamp, there are N tussocks, each positioned at integer coordinates. Valya, a girl standing at the left edge of the swamp, wants to cross it. She can start by jumping from the left bank to a tussock, then continue jumping from one tussock to another, and finally jump from a tussock to the right bank. However, due to her obsessive-compulsive disorder, Valya can only make jumps of a consistent distance. This means that the distance between each consecutive pair of tussocks on her path must be exactly the same, denoted as L. Additionally, the distance from the left bank to the first tussock and from the last tussock to the right bank must not exceed L. Your task is to determine the minimum jump length L that will enable Valya to successfully cross the swamp.
**Input data.** The first line contains three integers: W, H, and N. The following N lines each contain a pair of numbers X, Y, representing the coordinates of the tussocks. The constraints are: 0 < W, H <= 100; 0 < N <= 1000.
**Output data.** Output a single integer L^2, where L is the required jump length.