Very nice dp. Catalan + interval.