CodeLab Academy 📞 9936 6696
← List Python · Level 10: Algorithms Code · 100 points ← #961 #963 →

#962. Bipartite graph?

If you can paint the vertices of the graph with two colors so that the two ends of every edge have different colors, print `Yes`, otherwise `No`. ### Input n m, then m lines `u v`. ### Output `Yes` or `No`.

Examples

Input
4 2
3 3
3 2
Output
No
Input
5 3
3 3
2 5
5 4
Output
No

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!