
You are given an integer n representing the dimensions of an n x n grid, with the origin at the bottom-left corner of the grid. You are also given a 2D array of coordinates rectangles , where rectangles[i] is in the form [start _x , start _y , end _x , end _y ] , representing a rectangle on the grid. Each rectangle is defined as follows:
(start _x , start _y ) : The bottom-left corner of the rectangle.
(end _x , end _y ) : The top-right corner of the rectangle.
Note that the rectangles do not overlap. Your task is to determine if it is possible to make either two horizontal or two vertical cuts on the grid such that:
Each of the three resulting sections formed by the cuts contains at least one rectangle.
Every rectangle belongs to exactly one section.
Return true if such cuts can be made; otherwise, return false .
3 <= n <= 10 ^93 <= rectangles.length <= 10 ^50 <= rectangles[i][0] < rectangles[i][2] <= n0 <= rectangles[i][1] < rectangles[i][3] <= nNo two rectangles overlap.