A group of tourists has the chance to visit many beautiful cities. Each member of the group names two cities and, for each of them, says whether they want to visit it or not. A tourist may name the same city twice, wanting to visit it one time and not wanting to visit it the other time.
Write a program that:
The first line contains two positive integers n and m (1≤n≤20000, 1≤m≤8000); n is the number of tourists and m is the number of cities. Tourists are numbered from 1 to n and cities from 1 to m.
Each of the next n lines contains two nonzero integers separated by a single space. The i-th of these lines contains the integers wi and wi′ describing the wishes of tourist i, where −m≤wi≤m, −m≤wi′≤m, wi=0 and wi′=0. A positive number means the tourist wants to visit the city with that number; a negative number means the tourist does not want to visit the city whose number equals its absolute value.
On the first line, print a single non-negative integer l, the number of cities to visit. On the second line, print the l city numbers, in increasing order, that must be visited to satisfy all tourists. When l=0, print 0 on the first line and leave the second line empty.
If no list of cities (possibly empty) can satisfy every tourist, print the word NO on the first and only line.
If several lists of cities satisfy all tourists, print only the lexicographically smallest one. Formally, describe an answer by the binary string b1b2…bm, where bj=1 if city j is visited and bj=0 otherwise, and treat 0 as smaller than 1. Among all valid answers, choose the one whose string b1b2…bm is lexicographically smallest (equivalently, scan the cities from 1 to m and leave each city unvisited whenever the remaining cities can still be chosen so that every tourist is satisfied). Then print the visited cities in increasing order.