human
A flowerbed has many flowers and two fountains.

You can adjust the water pressure and set any values r1(r1 ≥ 0) and r2(r2 ≥ 0), giving the distances at which the water is spread from the first and second fountain respectively. You have to set such r1 and r2 that all the flowers are watered, that is, for each flower, the distance between the flower and the first fountain doesn't exceed r1, or the distance to the second fountain doesn't exceed r2. It's OK if some flowers are watered by both fountains.

You need to decrease the amount of water you need, that is set such r1 and r2 that all the flowers are watered and the r12 + r22 is minimum possible. Find this minimum value.

Input

The first line of the input contains integers n, x1, y1, x2, y2 (1 ≤ n ≤ 2000,  - 107 ≤ x1, y1, x2, y2 ≤ 107) — the number of flowers, the coordinates of the first and the second fountain.

Next follow n lines. The i-th of these lines contains integers xi and yi ( - 107 ≤ xi, yi ≤ 107) — the coordinates of the i-th flower.

It is guaranteed that all n + 2 points in the input are distinct.

Output

Print the minimum possible value r12 + r22. Note, that in this problem optimal answer is always integer.

Examples

Input

2 -1 0 5 3
0 2
5 2

Output

6

Input

4 0 0 5 0
9 4
8 3
-1 0
1 4

Output

33

Note

The first sample is (r12 = 5, r22 = 1):  The second sample is (r12 = 1, r22 = 32): 
Solve the task in PYTHON3.

Can you provide a Python program to find this minimum value?
assistant
#Here is Python program to find this minimum value.

#!/usr/bin/python
import os,sys
import math
from pprint import pprint as P

class fountain:
    def __init__(self,x,y):
        self.x = x
        self.y = y
    def __str__(self):
        return "({0.x} {0.y})".format(self)

class flower(object):
    def __init__(self,id,x,y,d1,d2):
        self.id = id
        self.x = x
        self.y = y
        self.d1 = d1
        self.d2 = d2
    def __str__(self):
        return "({0.id} {0.x} {0.y}, {0.d1}, {0.d2})".format(self)

def distance(a,b):
    x = a.x - b.x
    y = a.y - b.y
    #return math.sqrt(x*x + y*y)
    return x*x + y*y

def distance2(a,bx,by):
    x = a.x - bx
    y = a.y - by
    #return math.sqrt(x*x + y*y)
    return x*x + y*y

def printl(list):
    for i in list:
        print(i)

def main():
    f1=None
    f2=None
    flowers = []
    fid=0
    #with open("input_file",'r') as fh:
    with sys.stdin as fh:
        flower_num, f1x, f1y, f2x, f2y = map(int, fh.readline().strip().split())
        f1 = fountain(f1x,f1y)
        f2 = fountain(f2x,f2y)
        for line in fh:
            x,y = map(int, line.strip().split())
            flowers.append(flower(fid,x,y,distance2(f1,x,y),distance2(f2,x,y)))
            fid+=1

    s1 = sorted(flowers, key=lambda x: x.d1, reverse = True)
    s2 = sorted(flowers, key=lambda x: x.d2, reverse = True)

    s1size = s1[0].d1
    s2size = 0
    result = s1size + s2size
    for i,item in enumerate(s1):
        if s2size <= item.d2:
            s2size = item.d2
        if i < len(s1)-1:
            s1size = s1[i+1].d1
        else:
            s1size = 0
        tmp = s1size + s2size
        if tmp < result:
            result = tmp
    print(str(result))

if __name__ == "__main__":
    sys.exit(main())