I had these same codes come up and the same rough idle. Check all vacuum lines then check the upper intake manifold gaskets by squirting carb cleaner at the mating surfaces while running. I found mine were shot and 1 vacuum line was collapsed. $30 later and an hour of labor last night and she is running like a champ again.
96 Contour SE
2.5 V-6