Little Artem is a very smart programmer. He knows many different difficult algorithms. Recently he has mastered in 2-SAT one.

In computer science, 2-satisfiability (abbreviated as 2-SAT) is the special case of the problem of determining whether a conjunction (logical AND) of disjunctions (logical OR) have a solution, in which all disjunctions consist of no more than two arguments (variables). For the purpose of this problem we consider only 2-SAT formulas where each disjunction consists of exactly two arguments.

Consider the following 2-SAT problem as an example: <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/601704e7df7a37d9164f79c37cca99967e8cd046.png" style="max-width: 100.0%;max-height: 100.0%;"/>. Note that there might be negations in 2-SAT formula (like for *x*<sub class="lower-index">1</sub> and for *x*<sub class="lower-index">4</sub>).

Artem now tries to solve as many problems with 2-SAT as possible. He found a very interesting one, which he can not solve yet. Of course, he asks you to help him. 

The problem is: given two 2-SAT formulas *f* and *g*, determine whether their sets of possible solutions are the same. Otherwise, find any variables assignment *x* such that *f*(*x*) ≠ *g*(*x*).
The first line of the input contains three integers *n*, *m*<sub class="lower-index">1</sub> and *m*<sub class="lower-index">2</sub> (1 ≤ *n* ≤ 1000, 1 ≤ *m*<sub class="lower-index">1</sub>, *m*<sub class="lower-index">2</sub> ≤ *n*<sup class="upper-index">2</sup>) — the number of variables, the number of disjunctions in the first formula and the number of disjunctions in the second formula, respectively.

Next *m*<sub class="lower-index">1</sub> lines contains the description of 2-SAT formula *f*. The description consists of exactly *m*<sub class="lower-index">1</sub> pairs of integers *x*<sub class="lower-index">*i*</sub> ( - *n* ≤ *x*<sub class="lower-index">*i*</sub> ≤ *n*, *x*<sub class="lower-index">*i*</sub> ≠ 0) each on separate line, where *x*<sub class="lower-index">*i*</sub> &gt; 0 corresponds to the variable without negation, while *x*<sub class="lower-index">*i*</sub> &lt; 0 corresponds to the variable with negation. Each pair gives a single disjunction. Next *m*<sub class="lower-index">2</sub> lines contains formula *g* in the similar format.
First sample has two equal formulas, so they are similar by definition.

In second sample if we compute first function with *x*<sub class="lower-index">1</sub> = 0 and *x*<sub class="lower-index">2</sub> = 0 we get the result 0, because <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/82cbca427149bc7516804c97b5963cbfddd08900.png" style="max-width: 100.0%;max-height: 100.0%;"/>. But the second formula is 1, because <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/c8a53f3cfcb77e8a34515ff1420d44e5e2c3db0b.png" style="max-width: 100.0%;max-height: 100.0%;"/>.
print("_RANDOM_GUESS_1690507570.4152606")# 1690507570.4152806