Eulerian?

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

This problem is interactive.

We have hidden from you an undirected graph GG on nn vertices. It is guaranteed to be connected and to not contain multiple edges or self-loops.

You can ask up to 6060 queries of the following form:

  • Consider a subset SS of all vertices of GG. How many edges are there in the subgraph induced by SS? In other words, how many edges in GG have both their endpoints in SS?

Your goal is to determine whether there exists an Eulerian cycle in this graph. An Eulerian cycle is a path in the graph that goes through every edge exactly once, and it starts and ends in the same vertex.

Note that graph GG is fixed before the start of interaction. In other words, the interactor is not adaptive.

입력

The first line contains a single integer nn (3n1043 \le n \le 10^4), the number of vertices in GG. It is guaranteed that GG has no more than 10510^5 edges, is connected, and does not contain multiple edges or self-loops.

힌트

The hidden graph in the example is the graph with 33 vertices and edges (2,1)(2, 1) and (2,3)(2, 3).