def METHOD_NAME(sample, factor: int):
    if isinstance(sample, Image.Image):
        dimensions = sample.size
    elif isinstance(sample, np.ndarray):
        dimensions = sample.shape
        if len(dimensions) == 3 and dimensions[2] == 0:
            return False
        dimensions = dimensions[:2]
    if dimensions[0] * dimensions[1] <= 100 * factor * factor:
        return False
    return dimensions[0] // factor > 0 and dimensions[1] // factor > 0