There are two simple (without self-intersections) polygons,
each represented by a sequence of vertices in either clockwise or counter-clockwise order.

Your program must determine whether the polygons are similar,
that is, whether one of them can be transformed into another by applying zero or
more of the following operations:

scaling all edges by a non-zero constant;

rotating by 90^{ ∘ } in any direction around some fixed point;

translation (offset by a vector);

orientation changing (from clockwise to counter-clockwise and vice-versa).

The choice of initial vertex might also be different.

Input format

Input contains integer n, followed by 2 ⋅ n vertices
(first one polygon, then another),
represented by pairs of integers: (x_{i}, y_{i}).

Output format

Output must contain a single integer:
1, if polygons are similar, 0 otherwise.

Constraints

It is guaranteed that both polygons are non-degenerate,
i.e. have an area strictly greater than zero.