def METHOD_NAME(minx, miny, maxx, maxy, n):
    width = maxx - minx
    height = maxy - miny
    matrix = []
    for j in range(n, 0, -1):
        for i in range(0, n):
            ulx = minx + (width/n) * i  # 10/5 * 1
            uly = miny + (height/n) * j  # 10/5 * 1
            lrx = minx + (width/n) * (i + 1)
            lry = miny + (height/n) * (j - 1)
            matrix.append([[ulx, uly], [lrx, lry]])
    return matrix