King’s Puzzle
King Kendrick is a sovereign ruler of Kotlin Kingdom. He is getting ready for the next session of the government. Kotlin Kingdom consists of cities. These cities need to be connected by several bidirectional roads. Since ministries are responsible for aspects of safety and comfort of the kingdom’s residents, some of them have made the following requirements:
"All the cities should be connected by new roads" — Ministry of Transport and Digital Infrastructure.
"There may not be a loop road — a road that connects a city with itself" — Ministry of Environment.
"There should be at most one road between a pair of cities" — Treasury Department.
"If is the number of roads connected to -th city, then the set should consist of exactly distinct numbers" — Ministry of ICPC.
King Kendrick has issues with the requirements from the Ministry of ICPC. He asks you to help him. Find any set of roads that suits all the requirements above or say that it is impossible.
Input
Two integers and .
Output
If it is impossible to satisfy all the requirements, output "NO" in the only line.
Otherwise, output "YES" in the first line.
Output — the number of roads in the second line.
Next lines should contain pairs of integers and — the cities to connect by a road.