Problem: There is a grid of square cells with H horizontal rows and W vertical columns. The cell at the i-th row and the j-th column will be denoted as Cell (i, j).

In Cell (i, j), a_{ij} coins are placed.

You can perform the following operation any number of times:

Operation: Choose a cell that was not chosen before and contains one or more coins, then move one of those coins to a vertically or horizontally adjacent cell.

Maximize the number of cells containing an even number of coins.

Constraints

* All values in input are integers.
* 1 \leq H, W \leq 500
* 0 \leq a_{ij} \leq 9

Input

Input is given from Standard Input in the following format:


H W
a_{11} a_{12} ... a_{1W}
a_{21} a_{22} ... a_{2W}
:
a_{H1} a_{H2} ... a_{HW}


Output

Print a sequence of operations that maximizes the number of cells containing an even number of coins, in the following format:


N
y_1 x_1 y_1' x_1'
y_2 x_2 y_2' x_2'
:
y_N x_N y_N' x_N'


That is, in the first line, print an integer N between 0 and H \times W (inclusive), representing the number of operations.

In the (i+1)-th line (1 \leq i \leq N), print four integers y_i, x_i, y_i' and x_i' (1 \leq y_i, y_i' \leq H and 1 \leq x_i, x_i' \leq W), representing the i-th operation. These four integers represents the operation of moving one of the coins placed in Cell (y_i, x_i) to a vertically or horizontally adjacent cell, (y_i', x_i').

Note that if the specified operation violates the specification in the problem statement or the output format is invalid, it will result in Wrong Answer.

Examples

Input

2 3
1 2 3
0 1 1


Output

3
2 2 2 3
1 1 1 2
1 3 1 2


Input

3 2
1 0
2 1
1 0


Output

3
1 1 1 2
1 2 2 2
3 1 3 2


Input

1 5
9 9 9 9 9


Output

2
1 1 1 2
1 3 1 4

Solution (in JAVA):

Solution:
import java.util.*;
import java.lang.*;
import java.io.*;

class Pair<E,F>{
    E first;
    F second;
    public Pair(E first, F second){
        this.first=first;
        this.second=second;
    }
    public E getFirst(){return first;}
    public F getSecond(){return second;}
    public String toString(){
        return "<"+first.toString()+","+second.toString()+">";
    }
    public int hashCode(){
        return first.hashCode()*30011+second.hashCode()+2;
    }
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Pair another = (Pair) obj;
        return this.getFirst().equals(another.getFirst())&&this.getSecond().equals(another.getSecond());
    }
}

class Point extends Pair<Integer,Integer>{
    public Point(int x, int y){
        super(x,y);
    }
}

class Operation{
    int oldX, oldY, newX, newY;
    public Operation(int oldX, int oldY, int newX, int newY){
        this.oldX = oldX;
        this.oldY = oldY;
        this.newX = newX;
        this.newY = newY;
    }
    public Operation(Point oldCood, Point newCood){
        this.oldX = oldCood.getFirst();
        this.oldY = oldCood.getSecond();
        this.newX = newCood.getFirst();
        this.newY = newCood.getSecond();
    }
    public String toString(){
        return (1+oldX)+" "+(1+oldY)+" "+(1+newX)+" "+(1+newY);
    }
}
public class Main {
    public static boolean inside(int H, int W, int h, int w){
        return h>=0 && h<H && w>=0 && w<W;
    }
    public static boolean inside(int H, int W, Point p){
        return inside(H,W,p.getFirst(),p.getSecond());
    }
    public static Point nextCell(int H, int W, int h, int w){
        if(h%2==0){
        	if(w==W-1) return new Point(h+1,w);
        	else return new Point(h,w+1);
        }else{
        	if(w==0) return new Point(h+1,w);
        	else return new Point(h,w-1);
        }
    }
    public static Point nextCell(int H, int W, Point cell){
        return nextCell(H,W,cell.getFirst(),cell.getSecond());
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int H = sc.nextInt();
        int W = sc.nextInt();
        int[][] board = new int[H][W];
        for(int h=0;h<H;h++)for(int w=0;w<W;w++) board[h][w]=sc.nextInt();
        LinkedList<Operation> operations = new LinkedList<>();
        Point current = new Point(0,0);
        while(inside(H,W,nextCell(H,W,current))){
        	if(board[current.getFirst()][current.getSecond()]%2!=0){
        	    Operation op = new Operation(current,nextCell(H,W,current));
        	    operations.add(op);
        	    board[current.getFirst()][current.getSecond()]--;
        	    board[nextCell(H,W,current).getFirst()][nextCell(H,W,current).getSecond()]++;
        	}
        	current = nextCell(H,W,current);
        }
        System.out.println(operations.size());
        for(Operation op:operations){
        	System.out.println(op);
        }
        
    }
}