Dimensions of p = pressure = [ML-1T-2]
Dimensions of p = Energy/Area x time = [ML0T-3]
Dimensions of c = speed = [LT-1]
Hence px qy cz = [ML-1T-2]x [ML0T-3]y [LT-1]z
Now,px qy cz will be dimensionless if
x + y = 0........(i)
-x + z = 0.......(ii)
and -2x -3y - z = 0.......(iii)
These equations have infinite solution.One of the solution is x = 1, y = -1, and z =1, so that px qy cz is dimensionless.