Eta and omega meson production in medium energy π+-p and K−p interactions