A new image compression algorithm is based on repeated rectangular areas on the image.
You need to write a subroutine for the encoder that finds the largest such area pair on a given image.
The input is an NxN size 1 bit per pixel png image (black and white pixels only).
The output should contain six integers separated by space, representing a largest repeated rectangle pair.
format: W H X1 Y1 X2 Y2
where W,H are the width and height of the rectangles and X1,Y1 and X2,Y2 are the two top left corners.
All the pixels in the (X1,Y1,W,H) rectangle must match to the ones in the (X2,Y2,W,H) rectangle and (X1,Y1) != (X2,Y2).
W*H must be the maximum possible. The rectanges must be on the image.
The coordinates of the top left corner of the image is (0,0).
8 7 0 0 0 1