Interaction of oxygen and hydrogen with palladium