CF15D Map

Description

There is an area map that is a rectangular matrix $ n×m $ , each cell of the matrix contains the average height of a corresponding area part. Peter works for a company that has to build several cities within this area, each of the cities will occupy a rectangle $ a×b $ cells on the map. To start construction works in a particular place Peter needs to remove excess ground from the construction site where a new city will be built. To do so he chooses a cell of the minimum height within this site, and removes excess ground from other cells of the site down to this minimum level. Let's consider that to lower the ground level from $ h_{2} $ to $ h_{1} $ ( $ h_{1}

Input Format

The first line contains four space-separated integers: map sizes $ n $ , $ m $ and city sizes $ a $ , $ b $ ( $ 1

Output Format

In the first line output $ k $ — the amount of constructed cities. In each of the following $ k $ lines output 3 space-separated numbers — the row number and the column number of the upper-left corner of a subsequent construction site, and the amount of the ground to remove from it. Output the sites in the order of their building up.