Varieties with at most quadratic growth