Elimination Race

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

문제

You are participating in an elimination race championship. The championship is held for nn participants with assigned numbers from 11 to nn and consists of n1n - 1 races on different tracks. After each race, the participant who comes the last is eliminated. After all races, the only remaining participant is crowned as the champion.

As an experienced participant, you know how fast each car can go on each track, and therefore, you can predict the results of each race. However, the order of tracks is not yet determined. Your task is to find out for every participant whether there exists a permutation of the tracks that can grant him a victory.

입력

The first line contains the only integer nn (2n5002 \leq n \leq 500): the number of participants.

Each of the following n1n - 1 lines describes a track and contains a permutation of numbers from 11 to nn: the order in which the participants get to the finish on that track, from fastest to slowest.

출력

You should print nn answers. The ii-th answer should have the following format.

If winning the championship is possible for ii-th participant, you should print "Yes" (without quotes, case insensitive) on the first line. On the second line, print a permutation of integers from 11 to n1n - 1: the order of tracks which grants victory to the ii-th participant. Tracks are numbered in the order they are given in the input.

Otherwise, you should output "No" on a single line.

If multiple answers exist, print any one of them.