CF215C Crosses
Description
There is a board with a grid consisting of $ n $ rows and $ m $ columns, the rows are numbered from $ 1 $ from top to bottom and the columns are numbered from $ 1 $ from left to right. In this grid we will denote the cell that lies on row number $ i $ and column number $ j $ as $ (i,j) $ .
A group of six numbers $ (a,b,c,d,x_{0},y_{0}) $ , where $ 0
Input Format
N/A
Output Format
N/A
Explanation/Hint
In the first sample the sought groups of six numbers are: $ (0,0,0,0,1,1) $ , $ (0,0,0,0,1,2) $ , $ (0,0,0,0,2,1) $ , $ (0,0,0,0,2,2) $ .
In the second sample the sought groups of six numbers are: $ (0,1,1,0,2,2) $ , $ (0,1,1,0,2,3) $ , $ (1,0,0,1,2,2) $ , $ (1,0,0,1,2,3) $ .