Question: How do access results from "solve"

How do I access and assign values given by the solve command

for example

f := unapply(x*(8*x^2+5*x+cos(y)), x, y);

p := solve({diff(f(x, y), x) = 0, diff(f(x, y), y) = 0}, {x, y})

This gives the following

{x = 0, y = (1/2)*Pi}, {x = -1/6, y = 0}, {x = -1/4, y = 0}, {x = -1/2, y = Pi}, {x = 1/12, y = Pi}

now if I type: p[1] I get the following

{x = 0, y = (1/2)*Pi}

Now this isn't very useful. I want to access the "0" and the "(1/2)*Pi". How do I do that?

Please Wait...