#P1912H. Hypercatapult Commute

Hypercatapult Commute

Description

A revolutionary new transport system is currently operating in Byteland. This system requires neither roads nor sophisticated mechanisms, only giant catapults.

The system works as follows. There are nn cities in Byteland. In every city there is a catapult, right in the city center. People who want to travel are put in a special capsule, and a catapult throws this capsule to the center of some other city. Every catapult is powerful enough to throw the capsule to any other city, with any number of passengers inside the capsule. The only problem is that it takes a long time to charge the catapult, so it is only possible to use it once a day.

The passenger may need to use the catapults multiple times. For example, if the passenger wants to travel from city A to city B, they can first use one catapult to move from A to C, and then transfer to another catapult to move from C to B.

Today there are mm passengers. Passenger ii wants to travel from city aia_i to city bib_i. Your task is to find the way to deliver all the passengers to their destinations in a single day, using the minimal possible number of catapults, or say that it is impossible.

The first line of the input contains two integers nn and mm (1n10001 \leq n \leq 1000, 0m1050 \leq m \leq 10^5) — the number of cities and the number of passengers. The next mm lines contain pairs of numbers aia_i and bib_i (1ai,bin1 \leq a_i, b_i \leq n, aibia_i \neq b_i).

In the first line print the number kk — the minimal number of catapults you need to use.

In the next kk lines, print descriptions of each catapult launch, in the order they need to be performed. Each description should consist of two integers cic_i, did_i, the index of the city to launch from, and the index of destination city.

Note that you don't need to print what passengers should be put into the capsule on each launch, but it should be possible for each passenger to reach their destination city using the plan you provide.

If it is impossible to deliver all passengers, print the single number 1-1.

Input

The first line of the input contains two integers nn and mm (1n10001 \leq n \leq 1000, 0m1050 \leq m \leq 10^5) — the number of cities and the number of passengers. The next mm lines contain pairs of numbers aia_i and bib_i (1ai,bin1 \leq a_i, b_i \leq n, aibia_i \neq b_i).

Output

In the first line print the number kk — the minimal number of catapults you need to use.

In the next kk lines, print descriptions of each catapult launch, in the order they need to be performed. Each description should consist of two integers cic_i, did_i, the index of the city to launch from, and the index of destination city.

Note that you don't need to print what passengers should be put into the capsule on each launch, but it should be possible for each passenger to reach their destination city using the plan you provide.

If it is impossible to deliver all passengers, print the single number 1-1.

Sample Input 1

5 6
1 3
1 2
2 3
4 2
1 5
5 1

Sample Output 1

5
5 1
1 2
4 2
2 3
3 5

Sample Input 2

3 6
1 2
1 3
2 1
2 3
3 1
3 2

Sample Output 2

-1