Vasya is a young mathematician. Sometimes it happens that Vasya's
homework includes many complicated mathematical problems, but
Vasya is not upset about it. Why is it so? The fact is that Vasya's father
is good at mathematics.
In one of the problems Vasya asked his father to solve, the
notion of a piecewise linear function is introduced. A piecewise
linear function is a function y = f(x)
whose graph in the coordinate system (x, y)
is a broken line with vertices (x1, y1),
The following conditions must hold: no three successive vertices
belong to the same line;
xi > xi−1
for i > 1; and x1 = −xN.
In Vasya's textbook, vertices of this broken line are called
breakpoints of the function. A piecewise linear function is
called even if for each x from
[x1, xN] it holds
f(−x) = f(x),
and a function is called odd if for each x from
[x1, xN] it holds
f(−x) = −f(x).
Vasya's task is to determine for a given piecewise linear function
if it can be represented as a sum of an even piecewise linear function
and odd piecewise linear function.
The first line contains an integer N
(2 ≤ N ≤ 30000).
The next N lines contain the coordinates of the breakpoints
of a piecewise linear function (xi, yi).
These are integers in the range from −15000 to 15000.
Output "Yes" if the given function can be represented as a sum of
an even piecewise linear function and an odd piecewise linear
function. Then output the coordinates of the breakpoints of the
even function, and after that output the coordinates of the
breakpoints of the odd function. The coordinates of each
breakpoint must be given in a separate line. Each coordinate must
contain at least four fractional digits. If the given function
cannot be represented in such a form, then output "No".
Problem Author: Fedor Fominykh
Problem Source: XIII-th USU Junior Contest, October 2006