def METHOD_NAME(arr):
    img = np.zeros(shape=[np.max(arr[:, 0]) + 1, np.max(arr[:, 1]) + 1], dtype="uint8")
    for line in arr:
        img[line[0], line[1]] = 1
    img_full = np.maximum.accumulate(img, 1) & np.maximum.accumulate(img[:, ::-1], 1)[:, ::-1]
    return np.array(np.where(img_full == 1)).T