Compounds of formula I
as well as pharmaceutically acceptable salts and esters thereof, wherein the substituents have the significance given in the specification, and the compounds are neuropeptide Y(NPY) antagonists which are useful in the treatment of obesity.