Recently, edward is reading a novel <yes, master ghost!(遵命,女鬼大人)>
The story is about a poor guy possessed by a ghost, and became a magician under the ghost's teaching, fighting against the evil and save the world finally.
This time, the human ghost team is going to dig a boss's grave, the lord of the ghosts' grave. It's not a easy thing. As we all know, ancient Chinese thinks that the grave is the home after human dead. So the boss's grave was built as an underground palace is not even strange. What's more, this grave was protected by misters, ghosts, gears, etc.
Now they faced the door after a long time journey but they can't open it. Lucky the ghost used her special eyes found that they are standing on a big map which marked with two color, white and black. The map consists of a lot of cell. Each cell is a square marked with white or black. So the map is a big rectangle actually. They both believe that the way to open the door is to find some row which use those row can make up a new rectangle that every column has only one white cell, because every thing has it's own balance, like Tai Chi.
To save the world, let's give them a hand. Write a program to find the new rectangle.