def isWithin(rect1, rect2):
    """Checks whether rectangle 1 is within rectangle 2
    Parameters:
        rect1: list of coordinates [minx, maxy, maxx, miny]
        rect2: list of coordinates [minx, maxy, maxx, miny]
    Returns:
        True if rect1 within rect2 else False
    """
    minx1, maxy1,maxx1, miny1 = rect1
    minx2, maxy2,maxx2, miny2 = rect2
    if minx1 < minx2 or maxx1 > maxx2 or miny1 < miny2 or maxy1 > maxy2:
        return False
    return True