Suppose you are given a convex (coordinates (x_i; y_i) for i from 0 to n). You have to divide it to 4 parts of equal squares by 2 orthogqonal lines.