I've Got Friends

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

문제

British scientists have found out that friendship is very predictable. They claim that two people can become friends if and only if they have at least one common favorite type of food among two favorite types of food of both.

A famous orchestra from Manchester was chosen for a scientific experiment. Each musician was asked to choose exactly two distinct types of food they like the most. 

In the initial report, the scientists have published the full list of pairs of musicians who can become friends according to their theory. The list of favorite types of food hasn't been published, though.

This looks suspicious to you, and you don't really trust this kind of scientific research. You'd like to check if this list of potential friendships is at all possible for some list of food preferences.

입력

The first line of the input contains two integers nn and mm (1n1051 \le n \le 10^5; 0m1050 \le m \le 10^5) --- the number of musicians in the experimental group and the number of potential pairs of friends, respectively. The musicians are numbered from 1 to nn.

Each of the next mm lines contains two integers a_ia\_i and b_ib\_i (1a_i,b_in1 \le a\_i, b\_i \le n; a_ib_ia\_i \ne b\_i) --- the numbers of musicians who can potentially be friends according to the scientific report.

All unordered pairs (a_i,b_i)(a\_i, b\_i) are distinct.

출력

If it's impossible to form a list of favorite types of food which doesn't contradict the report, output "No".

Otherwise, output "Yes" followed by nn pairs of integers f_i,0f\_{i, 0} and f_i,1f\_{i, 1} (109f_i,j109-10^9 \le f\_{i, j} \le 10^9; f_i,0f_i,1f\_{i, 0} \ne f\_{i, 1}) --- identifiers of favorite types of food of the ii-th musician. Different integers correspond to different types of food.