Yadi, Flaherty lift Cardinals over Pirates for fourth straight victory