During a preparation of programming contest, its jury is usually faced with many difficult tasks. One of them is to select a problem simple enough to most, if not all, contestants to solve.
The difficulty here lies in diverse meanings of the term "simple" amongst the jury members. So, the jury uses the following procedure to reach a consensus: each member weights each proposed problem with a positive integer "complexity rating" (not necessarily different for different problems). The jury member calls "simplest" those problems that he gave the minimum complexity rating, and "hardest" those problems that he gave the maximum complexity rating.
The ratings received from all jury members are then compared, and a problem is declared as "very simple", if it was called as "simplest" by more than a half of the jury, and was called as "hardest" by nobody.
Input file format
The first line of input file contains integers N and P, the number of jury members and the number of problems. The following N lines contain P integers in range from 0 to 1000 each - the complexity ratings.
Output file format
Output file must contain an ordered list of "very simple" problem numbers, separated by spaces. If there are no such problems, output must contain a single integer 0 (zero).
For a given undirected graph with N vertices and M edges
you need to figure out whether the graph is bipartite or no.
NOTE. A graph is called bipartite if it's possible
to split its vertices into two non-empty sets so that there is no edges
between any two vertices from the same set.
Input file format
Input file contains integers NM, then M
pairs of integers aibi describing the edges of the graph.
Output file format
Output BIPARTITE if the graph is bipartite or NO if it is not.