The equation 3x^2-24x=-56
is rewritten in the form
3(x-p)^2+q=0
What is the value of P