CF111E Petya and Rectangle

Description

Little Petya loves playing with rectangles. Mom bought Petya a rectangle divided into cells $ n×m $ in size (containing $ n $ rows, $ m $ columns). Petya marked two different cells of the rectangle and now he is solving the following task: Let's define a simple path between those two cells as a sequence of distinct cells $ a_{1},a_{2},...,a_{k} $ , where $ a_{1} $ and $ a_{k} $ are the two marked cells. Besides, $ a_{i} $ and $ a_{i+1} $ are side-neighboring cells of the path ( $ 1

Input Format

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

Output Format

In the first line print the length of the found path — $ k $ . In the next lines print $ k $ pairs of integers, one per line — coordinates of the cells that constitute the found path in the order, in which they follow in the path (the path must go from cell $ (x_{1},y_{1}) $ to cell $ (x_{2},y_{2}) $ ). If there are several solutions, print any of them.

Explanation/Hint

The statement test is described in the picture: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF111E/f65377dc990f9413b8a38aa577fe7e1bc595c25c.png)