Tiny Room
Time limit2sMemory limit512 MB
Given N points and an H by W room, check whether the points can be rotated and moved to fit inside the room shrunk by R on every side.
Problem
You are an employee of Automatic Cleaning Machine (ACM) and a member of the development team of Intelligent Circular Perfect Cleaner (ICPC). ICPC is a robot that cleans up the dust of the places it passes through.
Your task is to inspect ICPC. The inspection checks whether the center of ICPC reaches all given points.
However, the laboratory may be too small to place all the points so that the entire body of ICPC stays inside the laboratory during the inspection. The laboratory is a rectangle of , and ICPC is a circle of radius . Write a program that checks whether all the points can be placed in the laboratory by rotating and/or translating them while keeping the distance between every pair of points unchanged.
Input
The input consists of a single test case in the following format.
$N$ $H$ $W$ $R$
$x_1$ $y_1$
$\vdots$
$x_N$ $y_N$
The first line has four integers , , , and (, , ). The following lines give the coordinates of the points that the center of ICPC must reach. The -th line has two integers and (), the x and y coordinates of the -th point. It is guaranteed that the answer does not change even if changes by .
Output
If all the points can be placed in the laboratory, print Yes. Otherwise, print No.