Let $$$p$$$ and $$$q$$$ be two permutations of $$$\{1, 2, \ldots, N\}$$$.
A similarity graph of $$$p$$$ and $$$q$$$, $$$S(p,q)$$$, is defined as follows:
You are given a simple undirected graph $$$G$$$ with $$$N$$$ labeled vertices, numbered from $$$1$$$ to $$$N$$$.
Find a pair $$$(p, q)$$$ of permutations of $$$\{1, 2, \ldots, N\}$$$ satisfying $$$S(p,q) = G$$$.
The first line contains one integer, $$$N$$$.
Each of the next $$$N$$$ lines contains $$$N$$$ space-separated integers. The $$$j$$$-th integer of the $$$i$$$-th line, $$$E(i, j)$$$, is $$$1$$$ if there is an edge between vertices $$$i$$$ and $$$j$$$, or $$$0$$$ otherwise.
If it is impossible to find $$$p$$$ and $$$q$$$ satisfying the condition, output NO.
Otherwise, output YES on the first line. On the following two lines, output $$$p$$$ and $$$q$$$. If there are multiple answers, output any one of them.
4 0 1 0 1 1 0 0 0 0 0 0 1 1 0 1 0
YES 1 2 3 4 2 4 1 3
6 0 1 0 1 0 1 1 0 0 0 1 0 0 0 0 1 1 1 1 0 1 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0
NO