SP12734 QN02 - Seating Arrangement
Description
### Problem Statement
In DA-IICT, the end sems are just around the corner and it seems like all the students are working very hard. But it's not just students, the professors are hard at work too. In particular, the Dean (Students) is very busy working out the exam seating arrangements for all the students.
Now normally, as we all know, the benches in each of the exam halls can seat exactly 2 students. Also, it is ensured that every bench contains exactly 2 students from different batches (so that there is no copying). But inspite of this, the Dean has noticed that even if the 2 students are from totally different batches, if they are friends, then they tend to help each other (or atleast try to, depending on how much they both know). The Dean wants to prevent this, so the seating arrangement is such that no two friends sit side by side during any exam, so that the students prepare well for the exams. But he is falling short of ideas to work this out.
Please help him out. You are given a list of pairs of IDs ( A, B ), such that the student with ID A is friends with the student with ID B. For every query ( C, D ) please print out whether or not these 2 students are friends ( meaning they cannot be seated with each other ).
**Note**: In this case, please assume friendship to be both **symmetric** and **transitive**. That is, if A is friends with B, B is also friends with A. Moreover, if A and B are friends and B and C are friends, this implies that A and C are also friends.
### Input
The input comprises of several lines. The first line contains 2 integers - n and m, where n is the number of students who will be writing the exam ( 2
Input Format
N/A
Output Format
N/A