CF43D Journey

Description

The territory of Berland is represented by a rectangular field $ n×m $ in size. The king of Berland lives in the capital, located on the upper left square $ (1,1) $ . The lower right square has coordinates $ (n,m) $ . One day the king decided to travel through the whole country and return back to the capital, having visited every square (except the capital) exactly one time. The king must visit the capital exactly two times, at the very beginning and at the very end of his journey. The king can only move to the side-neighboring squares. However, the royal advise said that the King possibly will not be able to do it. But there is a way out — one can build the system of one way teleporters between some squares so that the king could fulfill his plan. No more than one teleporter can be installed on one square, every teleporter can be used any number of times, however every time it is used, it transports to the same given for any single teleporter square. When the king reaches a square with an installed teleporter he chooses himself whether he is or is not going to use the teleport. What minimum number of teleporters should be installed for the king to complete the journey? You should also compose the journey path route for the king.

Input Format

The first line contains two space-separated integers $ n $ and $ m $ ( $ 1

Output Format

On the first line output integer $ k $ — the minimum number of teleporters. Then output $ k $ lines each containing 4 integers $ x_{1} $ $ y_{1} $ $ x_{2} $ $ y_{2} $ ( $ 1