def is_greyscale_palette(palette):
    """Return whether the palette is greyscale only."""
    for i in range(256):
        j = i * 3
        if palette[j] != palette[j + 1] != palette[j + 2]:
            return False
    return True