multidimensional arrays using awk

i'm trying to use awk to count a listing similar to the following and get a report of the listing similar to the one below it.

y,pizza
n,pizza
y,pizza
y,pizza
n,tomato
n,tomato
y,cheese
y,cheese
n,cheese

report
----
pizza,3,1
tomato,0,2
cheese,2,1

I know how to do a count of the number of yes's and no's individually, but not together

can anyone help me with this? i'm trying to find examples of people using multidimensional arrays with awk, but haven't found any.

thanks in advance.

-j

little issue in tomato.

$ awk -F, '{if ($1~/y/) {A[$2]++} else {B[$2]++} } END { for (i in B) print i, A,B}' OFS="," urfile
tomato,,2
cheese,2,1
pizza,3,1