Flat bands and high-order Van Hove singularities